Browse Source

[FIX] - date_end computed only for contract products

pull/208/head
sbejaoui 6 years ago
committed by Thomas Binsfeld
parent
commit
19edd4ce7a
  1. 2
      product_contract/models/sale_order_line.py

2
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') @api.onchange('date_start', 'product_uom_qty', 'recurring_rule_type')
def onchange_date_start(self): def onchange_date_start(self):
contract_line_env = self.env['account.analytic.invoice.line'] 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: if not rec.date_start:
rec.date_end = False rec.date_end = False
else: else:

Loading…
Cancel
Save