Skip to content
Snippets Groups Projects
Commit 8697a2ae authored by momegahed's avatar momegahed
Browse files

[FIX] l10n_in: Invoice title for india applies to all companies


Steps to reproduce:
1. install account_accountant
2. rename the Customer invoice journal to anything
3. print any invoice
4. the title doesn't change
5. install l10n_in
6. print any invoice
7. the title changes to the changed journal name

Issue:
the xpath replacing the title is not restricted to indian companies

Fix:
restrict it to only apply if the company is indian

opw-3473956

closes odoo/odoo#134149

Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
parent eadfec34
No related branches found
No related tags found
No related merge requests found
......@@ -30,16 +30,19 @@
</td>
</xpath>
<xpath expr="//h2" position="replace">
<h2>
<span t-if="o.move_type == 'out_invoice' and o.state == 'posted'" t-field="o.journal_id.name"/>
<span t-if="o.move_type == 'out_invoice' and o.state == 'draft'">Draft <span t-field="o.journal_id.name"/></span>
<span t-if="o.move_type == 'out_invoice' and o.state == 'cancel'">Cancelled <span t-field="o.journal_id.name"/></span>
<span t-if="o.move_type == 'out_refund'">Credit Note</span>
<span t-if="o.move_type == 'in_refund'">Vendor Credit Note</span>
<span t-if="o.move_type == 'in_invoice'">Vendor Bill</span>
<span t-field="o.name"/>
</h2>
<xpath expr="//h2" position="replace" >
<t t-if="o.company_id.account_fiscal_country_id.code == 'IN'">
<h2>
<span t-if="o.move_type == 'out_invoice' and o.state == 'posted'" t-field="o.journal_id.name"/>
<span t-if="o.move_type == 'out_invoice' and o.state == 'draft'">Draft <span t-field="o.journal_id.name"/></span>
<span t-if="o.move_type == 'out_invoice' and o.state == 'cancel'">Cancelled <span t-field="o.journal_id.name"/></span>
<span t-if="o.move_type == 'out_refund'">Credit Note</span>
<span t-if="o.move_type == 'in_refund'">Vendor Credit Note</span>
<span t-if="o.move_type == 'in_invoice'">Vendor Bill</span>
<span t-field="o.name"/>
</h2>
</t>
<t t-else="">$0</t>
</xpath>
</template>
......
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