Skip to Content
Menu
This question has been flagged
1 Reply
961 Views

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
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
2
Jul 25
363
1
Jul 25
505
2
Jul 25
546
2
Jun 25
767
2
May 25
738