From 19edd4ce7a32e6262e096b389754ee4b95f47cfd Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Wed, 6 Feb 2019 10:39:18 +0100 Subject: [PATCH] [FIX] - date_end computed only for contract products --- product_contract/models/sale_order_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_contract/models/sale_order_line.py b/product_contract/models/sale_order_line.py index 3b1cafd9..39d01e93 100644 --- a/product_contract/models/sale_order_line.py +++ b/product_contract/models/sale_order_line.py @@ -83,7 +83,7 @@ class SaleOrderLine(models.Model): @api.onchange('date_start', 'product_uom_qty', 'recurring_rule_type') def onchange_date_start(self): contract_line_env = self.env['account.analytic.invoice.line'] - for rec in self: + for rec in self.filtered('product_id.is_contract'): if not rec.date_start: rec.date_end = False else: