1、首先对该字段只读
<xpath expr="//field[@name='qty_producing']" position="attributes">
<attribute name="readonly">1</attribute>
</xpath>
2、对特定权限组开放编辑功能,groups_id是需要开放编辑功能的权限组
<record id="mrp_production_form_view_special" model="ir.ui.view">
<field name="name">mrp_production_form_view_special</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="groups_id" eval="[(6, 0,[ref('new_stock.group_mrp_batch')])]"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='qty_producing']" position="attributes">
<attribute name="readonly">0</attribute>
</xpath>
</field>
</record>
3、eval说明:图片来源于网络