[FIX] account: show taxes when they are zero on invoices print
Before this commit, the taxes with amount of zero are not shown on invoice print. For instance, the 15% tax of a product with value of €0.01 will not be show on invoice print. This previous commit 37a0f7acae8aebef35577b178f8aeefed11c9105 allows showing zero percent taxes on invoice print. This commit, will fine-tuning the previous commit to also show taxes with zero amount. opw-2307761 closes odoo/odoo#55665 X-original-commit: b8bb1e12a10477bb31addc6d3cecefa046dd09fe Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com> Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
committed by
Nicolas Lempereur
parent
812436e588
commit
86221d1f71
@@ -1402,9 +1402,10 @@ class AccountMove(models.Model):
|
||||
# At this point we only want to keep the taxes with a zero amount since they do not
|
||||
# generate a tax line.
|
||||
for line in move.line_ids:
|
||||
for tax in line.tax_ids.flatten_taxes_hierarchy().filtered(lambda t: t.amount == 0.0):
|
||||
res.setdefault(tax.tax_group_id, {'base': 0.0, 'amount': 0.0})
|
||||
res[tax.tax_group_id]['base'] += tax_balance_multiplicator * (line.amount_currency if line.currency_id else line.balance)
|
||||
for tax in line.tax_ids.flatten_taxes_hierarchy():
|
||||
if tax.tax_group_id not in res:
|
||||
res.setdefault(tax.tax_group_id, {'base': 0.0, 'amount': 0.0})
|
||||
res[tax.tax_group_id]['base'] += tax_balance_multiplicator * (line.amount_currency if line.currency_id else line.balance)
|
||||
|
||||
res = sorted(res.items(), key=lambda l: l[0].sequence)
|
||||
move.amount_by_group = [(
|
||||
|
||||
Reference in New Issue
Block a user