diff options
| author | Goffin Simon <sig@odoo.com> | 2018-03-08 14:13:21 +0100 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2018-03-08 15:46:20 +0100 |
| commit | 0bde7aa106b74e793bec69fe7f388cc1d4a5deca (patch) | |
| tree | ace97a284d3e8cad5d902e9cf7d9a6f7ebf2cf83 | |
| parent | 070f1173dac28127d97aa681dec5331c5420971f (diff) | |
[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
| -rw-r--r-- | addons/sale_timesheet/models/sale_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_timesheet/models/sale_order.py b/addons/sale_timesheet/models/sale_order.py index b0da56c02fa..fb1fd232ed8 100644 --- a/addons/sale_timesheet/models/sale_order.py +++ b/addons/sale_timesheet/models/sale_order.py @@ -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') |
