0
5 Answers
0
Best Answer
Many2one widget (default)
Options : Other possible options you can use with this widget.
- no_quick_create - It will remove Create and edit... option.
- no_create_edit - It will remove Create "entered text" option.
- no_create - no_quick_create and no_create_edit combined.
- no_open - in read mode: do not render as a link.
Example:
<field name="field_name" options="{'no_quick_create': True, 'no_create_edit' : True}"/>
You can refer it from Here
0
Best Answer
I have found the right way to write it. With this, the 'Create' option is invisible. The 'Create and edit...' is still there.
<xpath expr="//field[@name='partner_shipping_id']" position="attributes">
<attribute name="domain">['&',('parent_id','=',partner_id),('type','=','delivery')]</attribute>
<attribute name="options">{'no_quick_create':True}</attribute>
</xpath>
But it doesn't explain to me why the 'Create' option can create a new partner WITHOUT respecting 'Required=True' of a field declaration...
0
Best Answer
Hi Pascal !
You can write attributes to avoid create and create and edit fields in many2one fields with this code:
Regards,
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="options">{'no_quick_create':True,'no_create_edit':True}</attribute>
</xpath>
may be this will help you: https://www.youtube.com/watch?v=X_sdiKGQgJo