Skip to content
Snippets Groups Projects
Commit 21cccf9d authored by Jigar Vaghela's avatar Jigar Vaghela Committed by fw-bot
Browse files

[IMP] l10n_in: Remove GST tax column from invoice PDF


closes odoo/odoo#37759

X-original-commit: 0b04219514fc312b185d74d1512d11debfd2bae2
Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
parent 083c5bdd
No related branches found
No related tags found
No related merge requests found
......@@ -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">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment