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:
1 parent
71c328acef
commit
ae824ec936
2 files changed
+3
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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)),
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user