Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1069 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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!

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
aug. 25
241
2
iul. 25
441
1
iul. 25
618
2
iul. 25
695
2
iun. 25
868