From 21cccf9d7235b80fab30e19ce3fbd5df4a8ee686 Mon Sep 17 00:00:00 2001 From: Jigar Vaghela <jva@odoo.com> Date: Fri, 27 Sep 2019 14:03:39 +0000 Subject: [PATCH] [IMP] l10n_in: Remove GST tax column from invoice PDF closes odoo/odoo#37759 X-original-commit: 0b04219514fc312b185d74d1512d11debfd2bae2 Signed-off-by: Josse Colpaert <jco@openerp.com> --- addons/l10n_in/views/report_invoice.xml | 54 +------------------------ 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/addons/l10n_in/views/report_invoice.xml b/addons/l10n_in/views/report_invoice.xml index 0871aed87d77..2cbdecdcac2f 100644 --- a/addons/l10n_in/views/report_invoice.xml +++ b/addons/l10n_in/views/report_invoice.xml @@ -2,20 +2,6 @@ <odoo> <template id="l10n_in_report_invoice_document_inherit" inherit_id="account.report_invoice_document"> - <xpath expr="//table[@name='invoice_line_table']" position="before"> - <t t-if="o.company_id.country_id.code == 'IN'"> - <!-- Tag wise Tax Calculation --> - <t t-set="tag_cgst_id" t-value="env.ref('l10n_in.tax_report_line_cgst').id"/> - <t t-set="tag_sgst_id" t-value="env.ref('l10n_in.tax_report_line_sgst').id"/> - <t t-set="tag_igst_id" t-value="env.ref('l10n_in.tax_report_line_igst').id"/> - <t t-set="tag_cess_id" t-value="env.ref('l10n_in.tax_report_line_cess').id"/> - <t t-set="tax_map" t-value="o.tax_line_ids.mapped('tag_ids.tax_report_line_ids').ids"/> - <t t-set="is_igst" t-value="tag_igst_id in tax_map"/> - <t t-set="is_cgst" t-value="tag_cgst_id in tax_map"/> - <t t-set="is_cess" t-value="tag_cess_id in tax_map"/> - <t t-set="tax_datas" t-value="o.line_ids.filtered('tax_line_id')"/> - </t> - </xpath> <xpath expr="//p[@t-if='o.narration']" position="before"> <t t-if="o.company_id.country_id.code == 'IN'"> @@ -26,52 +12,16 @@ </t> </xpath> - <xpath expr="//table[@name='invoice_line_table']/thead/tr" position="inside"> + <xpath expr="//table[@name='invoice_line_table']/thead/tr/th[2]" position="after"> <t t-if="o.company_id.country_id.code == 'IN'"> <th>HSN/SAC<t t-set="colspan" t-value="colspan+1"/></th> - <th class="text-right" t-if="is_cgst">CGST<t t-set="colspan" t-value="colspan+1"/></th> - <th class="text-right" t-if="is_cgst">SGST<t t-set="colspan" t-value="colspan+1"/></th> - <th class="text-right" t-if="is_igst">IGST<t t-set="colspan" t-value="colspan+1"/></th> - <th class="text-right" t-if="is_cess">CESS<t t-set="colspan" t-value="colspan+1"/></th> </t> </xpath> - <xpath expr="//t[@name='account_invoice_line_accountable']" position="inside"> + <xpath expr="//t[@name='account_invoice_line_accountable']/td[1]" position="after"> <td> <span t-if="line.product_id.l10n_in_hsn_code" t-field="line.product_id.l10n_in_hsn_code"></span> </td> - <t t-if="o.company_id.country_id.code == 'IN'"> - <td class="text-right" t-if="is_cgst"> - <t t-foreach="tax_datas[line.id]" t-as="tax_data"> - <t t-if="tag_cgst_id in tax_data['report_line_ids']"> - <t t-esc="tax_data['amount']" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/> - </t> - </t> - </td> - <td class="text-right" t-if="is_cgst"> - <t t-foreach="tax_datas[line.id]" t-as="tax_data"> - <t t-if="tag_sgst_id in tax_data['report_line_ids']"> - <t t-esc="tax_data['amount']" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/> - </t> - </t> - </td> - <td class="text-right" t-if="is_igst"> - <t t-foreach="tax_datas[line.id]" t-as="tax_data"> - <t t-if="tag_igst_id in tax_data['report_line_ids']"> - <t t-esc="tax_data['amount']" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/> - </t> - </t> - </td> - <td class="text-right" t-if="is_cess"> - <t t-set="total_cess" t-value="0.0"/> - <t t-foreach="tax_datas[line.id]" t-as="tax_data"> - <t t-if="tag_cess_id in tax_data['report_line_ids']"> - <t t-set="total_cess" t-value="total_cess + tax_data['amount']" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/> - </t> - </t> - <t t-esc="total_cess" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/> - </td> - </t> </xpath> <xpath expr="//h2" position="replace"> -- GitLab