Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
965 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 25
368
1
jul 25
512
2
jul 25
565
2
jun 25
772
2
may 25
742