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 29953a09c7
commit 24284cce38
1 file changed
+6 -5
+6 -5
View File
@@ -2353,11 +2353,12 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView):
if self.account.party_required:
line.party = self.invoice.party
line.origin = self
tax_line = TaxLine()
tax_line.amount = amount
tax_line.type = 'tax'
tax_line.tax = self.tax
line.tax_lines = [tax_line]
if self.tax:
tax_line = TaxLine()
tax_line.amount = amount
tax_line.type = 'tax'
tax_line.tax = self.tax
line.tax_lines = [tax_line]
return [line]
def _credit(self):