diff options
| author | MaxLarue <mla@odoo.com> | 2019-09-03 11:34:37 +0000 |
|---|---|---|
| committer | Geoffroy Larue <gla@odoo.com> | 2019-09-18 12:05:19 +0000 |
| commit | 438194fa9dcd702ba7a99cd8c633a9b80498d7db (patch) | |
| tree | 9fbc0062baaa0702381037580e45bec6eaae5a91 | |
| parent | c22a2c729ec3ac71f5b6cd22aee0a266b11ab737 (diff) | |
[IMP] sale_timesheet: prevent copying the sale order line when duplicating task
This would lead to a strange situation, where two tasks share the same sale order which means change on one would be reflected on the other.
Task-2047389 Closes #36360
| -rw-r--r-- | addons/sale_timesheet/models/project.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_timesheet/models/project.py b/addons/sale_timesheet/models/project.py index b1feee42f33..0135390789d 100644 --- a/addons/sale_timesheet/models/project.py +++ b/addons/sale_timesheet/models/project.py @@ -146,7 +146,7 @@ class ProjectTask(models.Model): sale_line_id = fields.Many2one('sale.order.line', 'Sales Order Item', default=_default_sale_line_id, domain="[('is_service', '=', True), ('order_partner_id', '=', partner_id), ('is_expense', '=', False), ('state', 'in', ['sale', 'done']), '|', ('company_id', '=', False), ('company_id', '=', company_id)]", help="Sales order item to which the task is linked. If an employee timesheets on a this task, " "and if this employee is not in the 'Employee/Sales Order Item Mapping' of the project, the " - "timesheet entry will be linked to this sales order item.") + "timesheet entry will be linked to this sales order item.", copy=False) sale_order_id = fields.Many2one('sale.order', 'Sales Order', compute='_compute_sale_order_id', compute_sudo=True, store=True, readonly=True, help="Sales order to which the task is linked.") billable_type = fields.Selection([ ('task_rate', 'At Task Rate'), |
