加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

xml – 如何删除在odoo 8中单击搜索视图后打开的搜索视图中的“

发布时间:2020-12-16 22:40:40 所属栏目:百科 来源:网络整理
导读:如何删除“搜索更多”视图中显示的创建选项. 我试着用no_create和很少的东西,但没有帮助.有人对此有任何想法吗? 解决方法 many2one小部件(默认) 选项:此小部件可以使用的其他可能选项. no_quick_create – 删除创建和编辑…选项. no_create_edit – 删除创
如何删除“搜索更多”视图中显示的创建选项.

Search More

Create option

我试着用no_create和很少的东西,但没有帮助.有人对此有任何想法吗?

解决方法

many2one小部件(默认)

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

> no_quick_create – 删除创建和编辑…选项.
> no_create_edit – 删除创建“search_value”选项.
> no_create – no_quick_create和no_create_edit组合.
> no_open – 处于读取模式:不渲染为链接.

例:

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

Many2many

>小部件(默认)

选项

- no_create - remove the “Create” button.

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

> many2many_tags小部件

选项

no_quick_create – 删除“创建和编辑…”选项.

no_create_edit – 删除创建“search_value”选项.

no_create – no_quick_create和no_create_edit在一起.

<field name="field_name" widget="many2many_tags" options="{'no_create_edit': True}"/>

In order to remove CREATE button from search popup,you need to remove
it from ~/web/static/src/xml/base.xml file

there is code which add this button into that search wizard. This
button is adding conditionally to the wizard but no_create:True is
not working somehow. So if you want to remove it from every wizard
then just remove it from file else think something how to hide that
field conditionally.

<t t-name="SelectCreatePopup.search.buttons">
    <t t-if="! widget.options.disable_multiple_selection">
        <button type="button" class="oe_button oe_selectcreatepopup-search-select oe_highlight" disabled="disabled">Select</button>
    </t>
    <t t-if="!widget.options.no_create">
    <button type="button" class="oe_button oe_selectcreatepopup-search-create">Create</button>
    or </t><a class="oe_selectcreatepopup-search-close oe_bold oe_form_button_cancel" href="javascript:void(0)">Cancel</a>
</t>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读