【发布时间】:2020-03-06 12:16:50
【问题描述】:
我正在开发 odoo 12 (python 3.6),我正在尝试从 product.template 继承并隐藏条形码字段,但我遇到了这个错误:
element'<xpath expr="//field[@name='barcode']">' not found in parent view
这是我的 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>
请帮忙!
【问题讨论】:
标签: python xml python-3.6 odoo odoo-12