[12.0][ADD] - add auto_renew_interval, auto_renew_rule_type fields to sale order line

This commit is contained in:
sbejaoui
2020-02-17 18:08:22 +01:00
committed by Abraham Anes
parent 22e2051d3f
commit e4c2bbc391
6 changed files with 88 additions and 16 deletions

View File

@@ -41,6 +41,22 @@ class ProductTemplate(models.Model):
default='monthly',
string='Termination Notice type',
)
auto_renew_interval = fields.Integer(
default=1,
string='Renew Every',
help="Renew every (Days/Week/Month/Year)",
)
auto_renew_rule_type = fields.Selection(
[
('daily', 'Day(s)'),
('weekly', 'Week(s)'),
('monthly', 'Month(s)'),
('yearly', 'Year(s)'),
],
default='yearly',
string='Renewal type',
help="Specify Interval for automatic renewal.",
)
@api.onchange('is_contract')
def _change_is_contract(self):