-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] sale{_timesheet}: avoid using allowed_so_line_ids
Before this commit, the `allowed_so_line_ids` has been introduced to always use `_default_sale_line_domain` method in the domain of `so_line` field and so instead of easing the domain in the field definition we will be able to override the domain by overriding `_default_sale_line_domain` method. However, since in `sale_timesheet` module, the new domain will contain a dynamic value in the right part of a leaf (`('order_partner_id', 'child_of', commercial_partner_id)`), the `allowed_so_line_ids` is instead use in the domain of `so_line` field to easily add that leaf in the domain returned `_default_sale_line_domain` in the compute method of that field. The problem is the number of SOLs fetched could be really huge and caused a performance issues. This commit reverts the commit b7491b5 by - deprecating the `allowed_so_line_ids`, that is, that field will now always get an empty recordset. - deprecating the `_default_sale_line_domain` method, that is the method will no longer be used - manually adding the domain instead of calling `_default_sale_line_domain` - altering the domain when the `sale_timesheet` module is installed to get the same domain used in the `sale_line_id` of `project.task` model closes odoo#149747 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
- Loading branch information
Showing
3 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters