Any idea on why amount_untaxed is not found in sale.view_order_form
Error details: Element '<xpath expr="//field[@name]='amount_untaxed'">' can not be located in parent view
Context error: View `Total Amount Discount Fields for Sale Order Form` [view_id: 995, xml_id: n/a, model: sale.order, parent_id: 575]" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/custom/discount_from_total/views/sale_order_form.xml:4, near
<record id="discount_from_total_in_sale_order_form" model="ir.ui.view"> <field name="name">Total Amount Discount Fields for Sale Order Form</field> <field name="model">sale.order</field> <field name="inherit_id" ref="sale.view_order_form"/> <field name="arch" type="xml"> <xpath expr="//field[@name]='amount_untaxed'" position="after"> <field name="amount_discount"/> </xpath> </field> </record>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
You have an error in your xpath expression, it should be:
<xpath expr="//field[@name='amount_untaxed']" position="after"> <field name="amount_discount"/> </xpath>
you could also use it like this instead of using an xpath:
<field name="amount_untaxed" position="after">
<field name="amount_discount"/>
</field>
I finally realized my xpath was wrong. Unfortunatelly I was following "Odoo Development Essentials" book which actually had a mistake and used this wrong xpath.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
1
mar 15
|
12207 | ||
|
0
paź 23
|
1277 | ||
|
3
mar 18
|
5954 | ||
|
2
sie 16
|
11151 | ||
|
1
lip 15
|
7005 |