How to remove Create and Edit… from many2one field

2019-03-15 18:40发布

Please advice me How to remove "Create and Edit..." from many2one field.? that item shows below in the many2one fields which I filtered with domain option.

OpenERP version 7

10条回答
走好不送
2楼-- · 2019-03-15 19:42

In the XML file:

Please add options="{'no_create': True}" to your field which will remove the create button

查看更多
冷血范
3楼-- · 2019-03-15 19:42

In you XML file

<field name="your_field_name" options="{'no_quick_create':True,'no_create_edit':True,'no_open': True,}"/>
查看更多
何必那么认真
4楼-- · 2019-03-15 19:44

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 Ludwik Trammer's post

查看更多
来,给爷笑一个
5楼-- · 2019-03-15 19:44

In the xml file put:

<field name="my_field_name" options="{'no_create' : True}"/>

I hope this works!

查看更多
登录 后发表回答