diff options
| author | Jigar Vaghela <jva@odoo.com> | 2019-10-01 10:37:53 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-07 13:13:44 +0000 |
| commit | 2cc2fca17ad2cbf686091c4acb3be802bc1691a9 (patch) | |
| tree | fb7b44de5d7c3ea319e7ae29a1b8e346e2751761 /addons/l10n_in | |
| parent | 52ec2d378c69c6036c716ab0be9ac76e4dc462ed (diff) | |
[FIX] l10n_in: Fix report query
this is removed in https://github.com/odoo/odoo/commit/3936d655c4bfd845b6ead724cecdc8e7c62816eb#diff-10f4702f062a1eab9a272542d2914710L231
but need to group by parent tax_id if available
closes odoo/odoo#38094
X-original-commit: 79ea0b379c87103c6b9167f53722f195b444b0fb
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/l10n_in')
| -rw-r--r-- | addons/l10n_in/report/account_invoice_report.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/l10n_in/report/account_invoice_report.py b/addons/l10n_in/report/account_invoice_report.py index 60f2f4e1433..65a98083b4b 100644 --- a/addons/l10n_in/report/account_invoice_report.py +++ b/addons/l10n_in/report/account_invoice_report.py @@ -233,8 +233,10 @@ class L10nInAccountInvoiceReport(models.Model): ELSE (CASE WHEN aml.tax_base_amount <> 0 THEN aml.tax_base_amount ELSE NULL END) END AS price_total, (CASE WHEN aj.type = 'sale' AND (am.type IS NULL OR am.type != 'out_refund') THEN -1 ELSE 1 END) AS amount_sign, - at.id AS tax_id, - at.amount AS tax_rate + (CASE WHEN atr.parent_tax IS NOT NULL THEN atr.parent_tax + ELSE at.id END) AS tax_id, + (CASE WHEN atr.parent_tax IS NOT NULL THEN parent_at.amount + ELSE at.amount END) AS tax_rate """ return sub_select_str @@ -254,6 +256,8 @@ class L10nInAccountInvoiceReport(models.Model): LEFT JOIN res_partner p ON p.id = aml.partner_id LEFT JOIN res_country_state ps ON ps.id = p.state_id LEFT JOIN res_partner rp ON rp.id = am.l10n_in_reseller_partner_id + LEFT JOIN account_tax_filiation_rel atr ON atr.child_tax = at.id + LEFT JOIN account_tax parent_at ON parent_at.id = atr.parent_tax """ return from_str |
