diff options
| author | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-12-07 16:09:10 +0100 |
|---|---|---|
| committer | Xavier BOL (xbo) <xbo@odoo.com> | 2020-12-21 15:17:08 +0100 |
| commit | 9c01e06f06cff8e237392cfde7bb9670b5d5259e (patch) | |
| tree | f69231ecaf5086b3e77c0c0c94186338fdb85ba8 /addons/sale_project/models | |
| parent | 4279de1689d198fcf9002592d7b567cb18ba64c7 (diff) | |
[FIX] project_sale: prevent invalid SOL on project
Prior to this commit:
- The user could set a SOL which product was not of 'service' type.
After this commit:
- The user will no more be able to set a SOL which product is not
of 'service' type.
task-2409761
Diffstat (limited to 'addons/sale_project/models')
| -rw-r--r-- | addons/sale_project/models/project.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_project/models/project.py b/addons/sale_project/models/project.py index a5050f2f80f..02eed4af3aa 100644 --- a/addons/sale_project/models/project.py +++ b/addons/sale_project/models/project.py @@ -12,7 +12,7 @@ class Project(models.Model): sale_line_id = fields.Many2one( 'sale.order.line', 'Sales Order Item', copy=False, - domain="[('is_expense', '=', False), ('order_id', '=', sale_order_id), ('state', 'in', ['sale', 'done']), '|', ('company_id', '=', False), ('company_id', '=', company_id)]", + domain="[('is_service', '=', True), ('is_expense', '=', False), ('order_id', '=', sale_order_id), ('state', 'in', ['sale', 'done']), '|', ('company_id', '=', False), ('company_id', '=', company_id)]", help="Sales order item to which the project is linked. Link the timesheet entry to the sales order item defined on the project. " "Only applies on tasks without sale order item defined, and if the employee is not in the 'Employee/Sales Order Item Mapping' of the project.") sale_order_id = fields.Many2one('sale.order', 'Sales Order', domain="[('partner_id', '=', partner_id)]", copy=False, help="Sales order to which the project is linked.") |
