[FIX] sale_timesheet: AccessError on sale.order.line in multi-company

When the type of a product is changed by a user of company A, if this
product has been sold previously by company B, the user receives an
access error.

opw:1824548
This commit is contained in:
Goffin Simon
2018-03-08 15:46:20 +01:00
parent 070f1173da
commit 0bde7aa106
+1 -1
View File
@@ -137,7 +137,7 @@ class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
task_id = fields.Many2one('project.task', 'Task', index=True, help="Task generated by the sales order item")
is_service = fields.Boolean("Is a Service", compute='_compute_is_service', store=True, help="Sales Order item should generate a task and/or a project, depending on the product settings.")
is_service = fields.Boolean("Is a Service", compute='_compute_is_service', store=True, compute_sudo=True, help="Sales Order item should generate a task and/or a project, depending on the product settings.")
@api.multi
@api.depends('product_id.type')