Hi,
I had the following inherited view working on OpenERP 7, but I get this error when I try to install the corresponding module in Odoo 8 and I can't see what's wrong with the xpath. Can anybody help? Thanks.
Error:
File "lxml.etree.pyx", line 3313, in lxml.etree._Validator.assert_ (src/lxml/lxml.etree.c:159862) AssertionError: Element field has extra content: xpath, line 51
View:
<!-- ====================================================== -->
<!-- ORDER FORM -->
<!-- ====================================================== -->
<record model="ir.ui.view" id="view_order_form_multiple_discount">
<field name="name">sale.order.multiple.discount</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<field name="discount" position="replace">
<group col="8" colspan="6">
<field name="discount" invisible="1"/>
<newline/>
<field name="desconto1" on_change="onchange_desconto(desconto1,desconto2,desconto3, price_unit, product_uom_qty, tax_id)"/>
<field name="val_desconto1" invisible="True"/>
<field name="desconto2" on_change="onchange_desconto(desconto1,desconto2,desconto3, price_unit, product_uom_qty, tax_id)"/>
<field name="val_desconto2" invisible="True"/>
<field name="desconto3" on_change="onchange_desconto(desconto1, desconto2,desconto3, price_unit, product_uom_qty, tax_id)"/>
<field name="val_desconto3" invisible="True"/>
</group>
</field>
<xpath expr="//notebook/page[@string='Order Lines']/field[@name='order_line']/tree[@string='Sales Order Lines']/field[@name='price_unit']" position="replace">
<field name="price_unit" on_change="onchange_desconto(desconto1,desconto2,desconto3, price_unit, product_uom_qty, tax_id)"/>
</xpath>
<xpath expr="//notebook/page[@string='Order Lines']/field[@name='order_line']/tree[@string='Sales Order Lines']/field[@name='discount']" position="replace">
<field name="desconto1" on_change="onchange_desconto(desconto1,desconto2,desconto3, price_unit, product_uom_qty, tax_id)"/>
<field name="val_desconto1" invisible="True"/>
<field name="desconto2" on_change="onchange_desconto(desconto1,desconto2,desconto3, price_unit, product_uom_qty, tax_id)"/>
<field name="val_desconto2" invisible="True"/>
<field name="desconto3" on_change="onchange_desconto(desconto1, desconto2,desconto3, price_unit, product_uom_qty, tax_id)"/>
<field name="val_desconto3" invisible="True"/>
</xpath>
<field name="discount" class="oe_inline"/> %%<field name="amount_untaxed" position="after">
<group col="8" colspan="2">
<field name="tot_desconto1" readonly="1"/>
<newline/>
<field name="tot_desconto2" readonly="1"/>
<newline/>
<field name="tot_desconto3" readonly="1"/>
<newline/>
<field name="rounded" readonly="1"/>
<field name="tot_val_desconto1" invisible="True"/>
<field name="tot_val_desconto2" invisible="True"/>
<field name="tot_val_desconto3" invisible="True"/>
<field name="tot_rounded" invisible="True"/>
</group>
</field>
</field>
</record>