Reputation: 165
My module is inherit in "sale.order". Field payment_term_id is:
options="{'no_create': True}"
in core. How to change no_create:False in inherit module. I'm try: but it's not working.
<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>
Upvotes: 2
Views: 849
Reputation: 14778
Just remove the attribute 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>
Upvotes: 1