|
@ -205,23 +205,3 @@ class AccountAbstractAnalyticContractLine(models.AbstractModel): |
|
|
vals['price_unit'] = product.price |
|
|
vals['price_unit'] = product.price |
|
|
self.update(vals) |
|
|
self.update(vals) |
|
|
return {'domain': domain} |
|
|
return {'domain': domain} |
|
|
|
|
|
|
|
|
@api.onchange('product_id') |
|
|
|
|
|
def _onchange_product_id_recurring_info(self): |
|
|
|
|
|
for rec in self: |
|
|
|
|
|
rec.date_start = fields.Date.today() |
|
|
|
|
|
if rec.product_id.is_contract: |
|
|
|
|
|
rec.recurring_rule_type = rec.product_id.recurring_rule_type |
|
|
|
|
|
rec.recurring_invoicing_type = ( |
|
|
|
|
|
rec.product_id.recurring_invoicing_type |
|
|
|
|
|
) |
|
|
|
|
|
rec.recurring_interval = rec.product_id.recurring_interval |
|
|
|
|
|
rec.is_auto_renew = rec.product_id.is_auto_renew |
|
|
|
|
|
rec.auto_renew_interval = rec.product_id.auto_renew_interval |
|
|
|
|
|
rec.auto_renew_rule_type = rec.product_id.auto_renew_rule_type |
|
|
|
|
|
rec.termination_notice_interval = ( |
|
|
|
|
|
rec.product_id.termination_notice_interval |
|
|
|
|
|
) |
|
|
|
|
|
rec.termination_notice_rule_type = ( |
|
|
|
|
|
rec.product_id.termination_notice_rule_type |
|
|
|
|
|
) |
|
|
|