如何从many2one字段中删除Create和Edit ?

时间:2021-05-09 01:23:22

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.

请告诉我如何从多个2one领域删除“创建和编辑…”这个条目显示在我用域选项过滤的many2one字段中。

OpenERP version 7

OpenERP version 7

10 个解决方案

#1


17  

I don't have much idea. Maybe for that you have to make changes in web addons.

我不太清楚。也许你需要在web插件中进行修改。

But an alternative solution is that you can make that many2one field selection. Add widget="selection" attribute in your xml.

但是另一种解决方案是你可以选择很多21个字段。在xml中添加小部件=“选择”属性。

<field name="Your_many2one_field" widget="selection">

<字段名= " your_many2one_field“部件="选择">

#2


14  

Many2one widget (default)

Many2one部件(默认)

Options : Other possible options you can use with this widget.

选项:您可以使用此小部件的其他可能选项。

  • no_quick_create - It will remove Create and edit... option.
  • no_quick_create -它将删除创建和编辑…选择。
  • no_create_edit - It will remove Create "entered text" option.
  • no_create_edit——它将删除Create“enter text”选项。
  • no_create - no_quick_create and no_create_edit combined.
  • no_create - no_quick_create和no_create_edit合并在一起。
  • no_open - in read mode: do not render as a link.
  • no_open -在读取模式:不要渲染为一个链接。

Example:

例子:

<field name="field_name" options="{'no_quick_create': True, 'no_create_edit' : True}"/>

You can refer it from Ludwik Trammer's post

你可以从Ludwik网站上查阅

#3


6  

It is tested in openerp v7.0 , in which we can remove 'create and edit' by downloading a module present at,

它在openerp v7.0中测试,我们可以通过下载一个模块来移除“创建和编辑”,

https://www.odoo.com/apps/7.0/web_m2x_options/#access_token=31af017545174c1eb6745fa70c9b6684&scope=userinfo&state=&expires_in=3600&token_type=Bearer

https://www.odoo.com/apps/7.0/web_m2x_options/ access_token = 31 af017545174c1eb6745fa70c9b6684&scope = userinfo&state = &expires_in = 3600 &token_type =不记名

and adding attribute 'create':false, 'create_edit': false like this

添加属性'create':false, 'create_edit': false

    <field name="partner_id" options="{'limit': 10, 'create': false, 'create_edit': false}"/>

A nice tutorial about this is given here https://www.odoo.com/apps/7.0/web_m2x_options/

这里有一个关于这个的很好的教程,https://www.odoo.com/apps/7.0/web_m2x_options/

#4


3  

For Odoo 8.0 and 9.0, you should use no_create and no_open.

对于Odoo 8.0和9.0,您应该使用no_create和no_open。

no_create: Set to True to disable the option the create a new entry inside the drop down list.

no_create:设置为True来禁用该选项,在下拉列表中创建一个新条目。

no_open: Set to True to disable the button to the right of the drop down list which popup a windows allowing to edit the selected instance.

no_open:设置为True以禁用下拉列表右边的按钮,该按钮弹出一个窗口,允许编辑所选实例。

<field name="field_name"  options="{'no_create': True, 'no_open': True}" />

#5


2  

In the xml file put:

在xml文件put中:

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

I hope this works!

我希望这工作!

#6


1  

For those who don't want the 'selection' widget (it is less powerful, doesn't offer search capability) this is another method, tested in 8.

对于那些不想要“选择”小部件的人(它的功能没那么强大,不提供搜索功能),这是另一个在8中测试的方法。

<xpath expr="//field[@name='partner_id']" position="attributes">
   <attribute name="options">{'no_create': '1', 'no_create_edit': '1'}</attribute>
</xpath>

#7


1  

just add no_open, no_create, no_create_edit, in options

只需在选项中添加no_open、no_create、no_create_edit

<field name="partner_id" options='{"no_open": True,"no_create": 1, "no_create_edit": 1}'/>

I tried it and it is working fine.

我试过了,效果很好。

#8


1  

In the XML file:

在XML文件:

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

请将选项="{'no_create': True}"添加到您的字段中,该字段将删除create按钮。

#9


1  

In you XML file

在你的XML文件

<field name="your_field_name" options="{'no_quick_create':True,'no_create_edit':True,'no_open': True,}"/>

#10


0  

Solution for odoo here, for many2one relational field.

对odoo的解决方案,对many21关系域。

Works in listed below official odoo version, default feature.

作品如下官方odoo版本,默认功能。

  • odoo 9
  • odoo 9
  • odoo 10
  • odoo 10
  • odoo 11
  • odoo 11
<field name="patient_id" options="{'no_quick_create': true, 'no_create_edit': false}"/>

Note:

注意:

  • 'no_quick_create': true, disable inline creation feature, without
  • 'no_quick_create': true,禁用内联创建功能,没有。
  • popup 'no_create_edit': true, disable inline creation with popup features. 'no
  • 弹出窗口'no_create_edit': true,禁用带有弹出窗口特性的内联创建。“不
  • _create': true, diable inline and popup both with this only a option
  • _create': true, diable inline和popup这两个只有一个选项

#1


17  

I don't have much idea. Maybe for that you have to make changes in web addons.

我不太清楚。也许你需要在web插件中进行修改。

But an alternative solution is that you can make that many2one field selection. Add widget="selection" attribute in your xml.

但是另一种解决方案是你可以选择很多21个字段。在xml中添加小部件=“选择”属性。

<field name="Your_many2one_field" widget="selection">

<字段名= " your_many2one_field“部件="选择">

#2


14  

Many2one widget (default)

Many2one部件(默认)

Options : Other possible options you can use with this widget.

选项:您可以使用此小部件的其他可能选项。

  • no_quick_create - It will remove Create and edit... option.
  • no_quick_create -它将删除创建和编辑…选择。
  • no_create_edit - It will remove Create "entered text" option.
  • no_create_edit——它将删除Create“enter text”选项。
  • no_create - no_quick_create and no_create_edit combined.
  • no_create - no_quick_create和no_create_edit合并在一起。
  • no_open - in read mode: do not render as a link.
  • no_open -在读取模式:不要渲染为一个链接。

Example:

例子:

<field name="field_name" options="{'no_quick_create': True, 'no_create_edit' : True}"/>

You can refer it from Ludwik Trammer's post

你可以从Ludwik网站上查阅

#3


6  

It is tested in openerp v7.0 , in which we can remove 'create and edit' by downloading a module present at,

它在openerp v7.0中测试,我们可以通过下载一个模块来移除“创建和编辑”,

https://www.odoo.com/apps/7.0/web_m2x_options/#access_token=31af017545174c1eb6745fa70c9b6684&scope=userinfo&state=&expires_in=3600&token_type=Bearer

https://www.odoo.com/apps/7.0/web_m2x_options/ access_token = 31 af017545174c1eb6745fa70c9b6684&scope = userinfo&state = &expires_in = 3600 &token_type =不记名

and adding attribute 'create':false, 'create_edit': false like this

添加属性'create':false, 'create_edit': false

    <field name="partner_id" options="{'limit': 10, 'create': false, 'create_edit': false}"/>

A nice tutorial about this is given here https://www.odoo.com/apps/7.0/web_m2x_options/

这里有一个关于这个的很好的教程,https://www.odoo.com/apps/7.0/web_m2x_options/

#4


3  

For Odoo 8.0 and 9.0, you should use no_create and no_open.

对于Odoo 8.0和9.0,您应该使用no_create和no_open。

no_create: Set to True to disable the option the create a new entry inside the drop down list.

no_create:设置为True来禁用该选项,在下拉列表中创建一个新条目。

no_open: Set to True to disable the button to the right of the drop down list which popup a windows allowing to edit the selected instance.

no_open:设置为True以禁用下拉列表右边的按钮,该按钮弹出一个窗口,允许编辑所选实例。

<field name="field_name"  options="{'no_create': True, 'no_open': True}" />

#5


2  

In the xml file put:

在xml文件put中:

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

I hope this works!

我希望这工作!

#6


1  

For those who don't want the 'selection' widget (it is less powerful, doesn't offer search capability) this is another method, tested in 8.

对于那些不想要“选择”小部件的人(它的功能没那么强大,不提供搜索功能),这是另一个在8中测试的方法。

<xpath expr="//field[@name='partner_id']" position="attributes">
   <attribute name="options">{'no_create': '1', 'no_create_edit': '1'}</attribute>
</xpath>

#7


1  

just add no_open, no_create, no_create_edit, in options

只需在选项中添加no_open、no_create、no_create_edit

<field name="partner_id" options='{"no_open": True,"no_create": 1, "no_create_edit": 1}'/>

I tried it and it is working fine.

我试过了,效果很好。

#8


1  

In the XML file:

在XML文件:

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

请将选项="{'no_create': True}"添加到您的字段中,该字段将删除create按钮。

#9


1  

In you XML file

在你的XML文件

<field name="your_field_name" options="{'no_quick_create':True,'no_create_edit':True,'no_open': True,}"/>

#10


0  

Solution for odoo here, for many2one relational field.

对odoo的解决方案,对many21关系域。

Works in listed below official odoo version, default feature.

作品如下官方odoo版本,默认功能。

  • odoo 9
  • odoo 9
  • odoo 10
  • odoo 10
  • odoo 11
  • odoo 11
<field name="patient_id" options="{'no_quick_create': true, 'no_create_edit': false}"/>

Note:

注意:

  • 'no_quick_create': true, disable inline creation feature, without
  • 'no_quick_create': true,禁用内联创建功能,没有。
  • popup 'no_create_edit': true, disable inline creation with popup features. 'no
  • 弹出窗口'no_create_edit': true,禁用带有弹出窗口特性的内联创建。“不
  • _create': true, diable inline and popup both with this only a option
  • _create': true, diable inline和popup这两个只有一个选项