Ann*_*ary 10 python xml one-to-many many-to-one openerp
请指教我如何从many2one字段中删除"创建和编辑...".该项目显示在我使用域选项过滤的many2one字段中.
OpenERP第7版
Sud*_*rya 18
我没有太多想法.也许是因为你必须在网络插件中进行更改.
但另一种解决方案是,您可以选择多个字段.在xml中添加属性.widget="selection"
<field name="Your_many2one_field" widget="selection">
Emi*_*td. 16
Many2one小部件(默认)
选项:此小部件可以使用的其他可能选项.
示例:
<field name="field_name" options="{'no_quick_create': True, 'no_create_edit' : True}"/>
Run Code Online (Sandbox Code Playgroud)
它在openerp v7.0中进行了测试,我们可以通过下载存在的模块删除"创建和编辑",
并添加属性'create':false,'create_edit':false就像这样
<field name="partner_id" options="{'limit': 10, 'create': false, 'create_edit': false}"/>
Run Code Online (Sandbox Code Playgroud)
这里给出了一个很好的教程 https://www.odoo.com/apps/7.0/web_m2x_options/
对于 Odoo 8.0 和 9.0,您应该使用 no_create 和 no_open。
no_create:设置为 True 可禁用在下拉列表中创建新条目的选项。
no_open:设置为 True 可禁用下拉列表右侧的按钮,该按钮会弹出一个窗口,允许编辑所选实例。
<field name="field_name" options="{'no_create': True, 'no_open': True}" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15013 次 |
| 最近记录: |