[FIX] l10n_ae_pos: avoid string-based xpath

Being text-based is a bad idea. Better have clear nodes to fetch in original
XML.

closes odoo/odoo#104686

Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit is contained in:
Thibault Delavallée
2022-11-02 11:38:38 +01:00
parent 00f4161182
commit 892ff87c51
2 changed files with 3 additions and 3 deletions
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="OrderReceiptVAT" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
<xpath expr="//div[contains(text(), 'Total Taxes')]" position="replace">
<div>
<xpath expr="//div[@id='post_receipt_taxes_container']" position="replace">
<div id='post_receipt_taxes_container'>
<t t-if="env.pos.company.country.code == 'AE'">VAT</t>
<t t-else="">Total Taxes</t>
<span t-esc="env.pos.format_currency(receipt.total_tax)" class="pos-receipt-right-align"/>
@@ -114,7 +114,7 @@
<span t-esc="env.pos.format_currency_no_symbol(tax.amount)" class="pos-receipt-right-align"/>
</div>
</t>
<div>
<div id="post_receipt_taxes_container">
Total Taxes
<span t-esc="env.pos.format_currency(receipt.total_tax)" class="pos-receipt-right-align"/>
</div>