Browse Source

[FIX] - Default value for date_start applied on product change

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

3
product_contract/models/sale_order_line.py

@ -48,7 +48,7 @@ class SaleOrderLine(models.Model):
help="Repeat every (Days/Week/Month/Year)", help="Repeat every (Days/Week/Month/Year)",
copy=False, copy=False,
) )
date_start = fields.Date(string='Date Start', default=fields.Date.today())
date_start = fields.Date(string='Date Start')
date_end = fields.Date(string='Date End', index=True) date_end = fields.Date(string='Date End', index=True)
@api.onchange('product_id') @api.onchange('product_id')
@ -59,6 +59,7 @@ class SaleOrderLine(models.Model):
self.product_id.recurring_invoicing_type self.product_id.recurring_invoicing_type
) )
self.recurring_interval = self.product_id.recurring_interval self.recurring_interval = self.product_id.recurring_interval
self.date_start = fields.Date.today()
@api.multi @api.multi
def _prepare_contract_line_values(self, contract): def _prepare_contract_line_values(self, contract):

Loading…
Cancel
Save