如何更改 no_create: 在 odoo 中为 False
How to change no_create: False in odoo
我的模块继承自 "sale.order"。字段 payment_term_id 是:
options="{'no_create': True}"
在核心。
如何在继承模块中更改 no_create:False。
我正在尝试:但它不起作用。
<record id="view_order_form_inherit" model="ir.ui.view">
<field name="name">sale.order.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet/group/group/field[@name='payment_term_id']" position="attributes">
<attribute name="attrs">{'no_create': false}</attribute>
</xpath>
</field>
</record>
只需删除属性 options
:
<record id="view_order_form_inherit" model="ir.ui.view">
<field name="name">sale.order.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet/group/group/field[@name='payment_term_id']" position="attributes">
<attribute name="options" />
</xpath>
</field>
</record>
我的模块继承自 "sale.order"。字段 payment_term_id 是:
options="{'no_create': True}"
在核心。 如何在继承模块中更改 no_create:False。 我正在尝试:但它不起作用。
<record id="view_order_form_inherit" model="ir.ui.view">
<field name="name">sale.order.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet/group/group/field[@name='payment_term_id']" position="attributes">
<attribute name="attrs">{'no_create': false}</attribute>
</xpath>
</field>
</record>
只需删除属性 options
:
<record id="view_order_form_inherit" model="ir.ui.view">
<field name="name">sale.order.form</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet/group/group/field[@name='payment_term_id']" position="attributes">
<attribute name="options" />
</xpath>
</field>
</record>