Require tax on tax line

Without a proper tax, the tax line is never shown in any tax code reports.

issue8364
review261511002
This commit is contained in:
Cédric Krier committed 2019-06-16 19:14:46 +02:00
1 parent 71c328acef
commit ae824ec936
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -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
+2 -2
View File
@@ -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)),
],