[FIX] account: Fix taxes amount by group with group of taxes
- Create a vendor bill with a line having a group of taxes An additional tax line is displayed under the bill total with a 0 amount because the created group of taxes has a zero amount. closes odoo/odoo#51802 X-original-commit: adb02066f7cbead66eca21185f2ad142b46298a8 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This commit is contained in:
@@ -1416,7 +1416,7 @@ 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.filtered(lambda t: t.amount == 0.0):
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user