Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
1072 Представления

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

Аватар
Отменить
Лучший ответ

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!

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
авг. 25
246
2
июл. 25
443
1
июл. 25
620
2
июл. 25
701
2
июн. 25
869