如何正确继承 div 中的字段
How to inherit correctly field in div
如何正确继承字段
我继承了一个字段但没有按要求出现,因为它在div
里面
<group name="email_template_and_project" position="before">
<group name="sale_condition" string="Sale Conditions">
<label for="warranty" groups="stock.group_production_lot"/>
<div groups="stock.group_production_lot">
<field name="warranty" class="oe_inline"/> months
</div>
<label for="sale_delay"/>
<div>
<field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/> days
</div>
</group>
</group>
<record model="ir.ui.view" id="view_product_template_es_">
<field name="name">product.template.es.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='sale_delay']" position="after">
<div>
<field name = 'time_pose' /> hours
</div>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_product_template_es_">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='sale_delay']/parent::div" position="after">
<label for="time_pose"/>
<div>
<field name="time_pose" class="oe_inline"/> hours
</div>
</xpath>
</field>
</record>
如何正确继承字段 我继承了一个字段但没有按要求出现,因为它在div
里面<group name="email_template_and_project" position="before">
<group name="sale_condition" string="Sale Conditions">
<label for="warranty" groups="stock.group_production_lot"/>
<div groups="stock.group_production_lot">
<field name="warranty" class="oe_inline"/> months
</div>
<label for="sale_delay"/>
<div>
<field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/> days
</div>
</group>
</group>
<record model="ir.ui.view" id="view_product_template_es_">
<field name="name">product.template.es.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='sale_delay']" position="after">
<div>
<field name = 'time_pose' /> hours
</div>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_product_template_es_">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='sale_delay']/parent::div" position="after">
<label for="time_pose"/>
<div>
<field name="time_pose" class="oe_inline"/> hours
</div>
</xpath>
</field>
</record>