Reputation: 65
i'm working on odoo 12 (python 3.6) and i'm trying to inherit from the product.template and hide the barcode field , but i had this error:
element'<xpath expr="//field[@name='barcode']">' not found in parent view
this is my gesimmo_views.xml
<odoo>
<record model="ir.ui.view" id="view_form_gesimmo">
<field name="name">Product</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='standard_price']" position="after">
<group>
<field name="surface"/>
<!--<field name="refimmo"/>!-->
</group>
</xpath>
<xpath expr="//field[@name='barcode']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
</odoo>
PLEASE HELP !
Upvotes: 0
Views: 213
Reputation: 2444
You have applied the wrong reference. Only just change the reference to this product.product_template_only_form_view
Thanks
Upvotes: 1