diff --git a/CHANGELOG b/CHANGELOG index 8dba117522..c8487c3349 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Make tax required on tax line * Use today as default date when inside the period Version 5.2.0 - 2019-05-06 diff --git a/tax.py b/tax.py index eac5bc0ebc..fe865839b1 100644 --- a/tax.py +++ b/tax.py @@ -1099,7 +1099,7 @@ class TaxableMixin(object): line['legal_notice'] = tax.legal_notice line['base'] = base line['amount'] = amount - line['tax'] = tax.id if tax else None + line['tax'] = tax.id line['account'] = getattr(tax, '%s_account' % type_).id return _TaxKey(**line) @@ -1152,7 +1152,7 @@ class TaxLine(ModelSQL, ModelView): ('base', "Base"), ], "Type", required=True) tax = fields.Many2One('account.tax', 'Tax', select=True, - ondelete='RESTRICT', + ondelete='RESTRICT', required=True, domain=[ ('company', '=', Eval('company', -1)), ],