Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1048 Zobrazení

Currentl I am trying to create custom addons to rename Untaxed Amount seen in Outation and Invoice, but I cant figure out how, hope experts and experience out migth lend some help.

Error while parsing or validating view:

Element '<xpath expr="//label[contains(@class, 'o_tax_total_label')]">' cannot be located in parent view

Avatar
Zrušit
Nejlepší odpověď

Hello Takami, 

To achieve this, you'll need to create a custom addon and inherit the template "account.TaxTotalsField". Add the following code to your XML file:

<?xml version="1.0" encoding="UTF-8"?>
<templates>
    <t t-inherit="account.TaxTotalsField" t-inherit-mode="extension" owl="1">
        <xpath expr="//label[hasclass='o_tax_total_label']" position="replace">
            <label class="o_form_label o_tax_total_label">Total Untaxed Amount XYZ</label>
        </xpath>
    </t>
</templates>

After that, make sure to include the XML file path in your manifest.py under web.assets_backend.

I hope this helps! Let me know if you run into any issues.

Thanks!

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
srp 25
32
2
čvc 25
413
1
čvc 25
565
2
čvc 25
645
2
čvn 25
806