首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >隐藏或删除继承按钮Odoo

隐藏或删除继承按钮Odoo
EN

Stack Overflow用户
提问于 2018-01-15 14:59:00
回答 1查看 2.3K关注 0票数 0

我想隐藏机会视图上的2个按钮:“CreateQu言”&“TransfertoQu言”,这2个按钮是使用sale_crm (默认odoo模块)模块创建的,而不是直接在机会表单视图上实现的。

这是sale_crm模块的代码

代码语言:javascript
复制
<xpath expr="//field[@name='stage_id']" position="before">
  <button attrs="{'invisible': [('probability', '&lt;', 100)]}" 
         string="Create Quotation" name="618" type="action"/>
  <button attrs="{'invisible': [('probability', '=', 100)]}" 
         string="Convert to Quotation" name="618" type="action" 
         class="oe_highlight"/>
</xpath>

如何将它们隐藏在自定义模块中?

EN

回答 1

Stack Overflow用户

发布于 2018-01-15 19:54:11

我想这是第8版,所以:

代码语言:javascript
复制
<record model="ir.ui.view" id="crm_case_form_view_oppor_inherit">
<field name="name">CRM - Opportunities - Quote Second Inherit</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="sale_crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
    <data>
        <xpath expr="//field[@string='Create Quotation']" position="attributes">
            <attribute name="invisible">True</attribute>
        </xpath>
        <xpath expr="//field[@string='Convert to Quotation']" position="attributes">
            <attribute name="invisible">True</attribute>
        </xpath>
    </data>
</field>

你可以试试这个。我希望这对你有帮助。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48265480

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档