From 438194fa9dcd702ba7a99cd8c633a9b80498d7db Mon Sep 17 00:00:00 2001 From: MaxLarue Date: Tue, 3 Sep 2019 11:34:37 +0000 Subject: [PATCH] [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 --- addons/sale_timesheet/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'),