|
@ -79,6 +79,7 @@ class SaleOrderLine(models.Model): |
|
|
rec.product_id.auto_renew_rule_type, |
|
|
rec.product_id.auto_renew_rule_type, |
|
|
rec.product_id.auto_renew_interval, |
|
|
rec.product_id.auto_renew_interval, |
|
|
) |
|
|
) |
|
|
|
|
|
- relativedelta(days=1) |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
@api.onchange('date_start') |
|
|
@api.onchange('date_start') |
|
@ -88,12 +89,16 @@ class SaleOrderLine(models.Model): |
|
|
if not rec.date_start: |
|
|
if not rec.date_start: |
|
|
rec.date_end = False |
|
|
rec.date_end = False |
|
|
else: |
|
|
else: |
|
|
rec.date_end = rec.date_start + self.env[ |
|
|
|
|
|
|
|
|
rec.date_end = ( |
|
|
|
|
|
rec.date_start |
|
|
|
|
|
+ self.env[ |
|
|
'account.analytic.invoice.line' |
|
|
'account.analytic.invoice.line' |
|
|
].get_relative_delta( |
|
|
].get_relative_delta( |
|
|
rec.product_id.auto_renew_rule_type, |
|
|
rec.product_id.auto_renew_rule_type, |
|
|
rec.product_id.auto_renew_interval, |
|
|
rec.product_id.auto_renew_interval, |
|
|
) |
|
|
) |
|
|
|
|
|
- relativedelta(days=1) |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
@api.multi |
|
|
@api.multi |
|
|
def _prepare_contract_line_values(self, contract): |
|
|
def _prepare_contract_line_values(self, contract): |
|
|