[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
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user