This is my code:
<record id="view_order_form_inline" model="ir.ui.view">
<field name="model">sale.order.line</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree/field[11]" position="after">
<field name="xx_insurance_inline"/>
</xpath>
</field>
</record>
This is to add a new column inside the sales order lines. When updating my module i get the following error:
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition
Error details:
Field `origin` does not exist
Error context:
View `sale.order.line form`
[view_id: 1035, xml_id: n/a, model: sale.order.line, parent_id: 647]" while parsing /home/pantera/Custom/xx_khleuven2/view/sale.xml:24, near
<record id="view_order_form_inline" model="ir.ui.view">
<field name="model">sale.order.line</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree/field[11]" position="after">
<field name="xx_insurance_inline"/>
</xpath>
</field>
</record>
Since there is nowhere in my code a reference to a field called origin I have no idea what the exact problem is. Should adding the column be done in a different way or am i overlooking something obvious?
Aucun commentaire:
Enregistrer un commentaire