diff --git a/custom_p/models/sale_order_line.py b/custom_p/models/sale_order_line.py index 76622a2123..0b215e933e 100644 --- a/custom_p/models/sale_order_line.py +++ b/custom_p/models/sale_order_line.py @@ -94,6 +94,6 @@ def _get_invoice_qty(self): @api.model def create(self, values): result = super(SaleOrderLine, self).create(values) - if not self.order_id.commitment_date: + if not result.order_id.commitment_date: result.order_id.commitment_date = result.order_id.expected_date return result