summaryrefslogtreecommitdiff
path: root/addons/l10n_in
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2019-10-02 12:54:24 +0000
committerLucas Perais (lpe) <lpe@odoo.com>2019-10-02 13:00:58 +0000
commite47e74afc4cf649be9a476785b0dc375c92aea2a (patch)
tree5ab87893ad187f2bb6cd2b2fa966ebfaeea243e0 /addons/l10n_in
parent7d93c80693574cfd7baf9a2dc54283ac4ae8cb5b (diff)
[FIX] account, l10n_in: amount by group base when overriden
Fine tuning of 7bea912 In india there are as many tax lines on an invoices as there are repartition lines (classic) * products So, before this commit, preventing adding the base if tax was already seen was not enough, the base was still added many times After this commit, hopefully, the based on amount is correct for each tax Forward port of #37390 closes odoo/odoo#37784 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Diffstat (limited to 'addons/l10n_in')
-rw-r--r--addons/l10n_in/models/account_invoice.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/l10n_in/models/account_invoice.py b/addons/l10n_in/models/account_invoice.py
index 69ff5cb7842..b960b47c791 100644
--- a/addons/l10n_in/models/account_invoice.py
+++ b/addons/l10n_in/models/account_invoice.py
@@ -46,3 +46,12 @@ class AccountMove(models.Model):
'quantity': base_line.quantity,
})
return res
+
+ @api.model
+ def _get_tax_key_for_group_add_base(self, line):
+ tax_key = super(AccountMove, self)._get_tax_key_for_group_add_base(line)
+
+ tax_key += [
+ line.product_id.id,
+ ]
+ return tax_key