[FIX] sale_project: Expecting an ID in write for Many2One
When we are writing on a Many2One field, we are supposed to pass the id of the object, in this case we are passing directly the object which is working with the ORM, but is not expected in overrides as the documentation suppose that an int is passed. community PR refused in stable:https://github.com/odoo/odoo/pull/88736 closes odoo/odoo#90992 Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit is contained in:
committed by
Pierre Masereel
parent
7394650865
commit
2490982fce
@@ -169,7 +169,7 @@ class SaleOrderLine(models.Model):
|
||||
# duplicating a project doesn't set the SO on sub-tasks
|
||||
project.tasks.filtered('parent_id').write({
|
||||
'sale_line_id': self.id,
|
||||
'sale_order_id': self.order_id,
|
||||
'sale_order_id': self.order_id.id,
|
||||
})
|
||||
else:
|
||||
project_only_sol_count = self.env['sale.order.line'].search_count([
|
||||
|
||||
Reference in New Issue
Block a user