コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
918 ビュー

hello guys i was working on a custom module in odoo 16 and in crm i want to hide or replace the quotation button but every time i got this error message 



action_sale_quotations_new is not a valid action on crm.lead


even  though im not targetting the button with name action_sale_quotations_new


<record id="crm_lead_quotations_button_hide" model="ir.ui.view">
​<field name="name">crm.lead.quotations.button.hide</field>
​<field name="model">crm.lead</field>
​<field name="inherit_id" ref="sale_crm.crm_case_form_view_oppor"/>
​<field name="arch" type="xml">
​<xpath expr="//button[@name='action_view_sale_quotation']" position="attributes">
​ ​<attribute name="invisible">1</attribute>
​</xpath>
​</field>
</record>

アバター
破棄
最善の回答

Hi,

Try the below code:

        <record id="crm_case_form_view_oppor" model="ir.ui.view">

            <field name="name">crm.lead.oppor.inherited.crm</field>

            <field name="model">crm.lead</field>

            <field name="inherit_id" ref="crm.crm_lead_view_form"/>

            <field name="arch" type="xml">

                <xpath expr="//button[@name='action_sale_quotations_new']" position="attributes">

                                <attribute name="invisible">1</attribute>

                </xpath>

            </field>

        </record>


Hope it helps

アバター
破棄
関連投稿 返信 ビュー 活動
1
3月 15
8181
1
3月 25
1007
3
12月 23
2621
1
8月 22
2673
2
11月 20
11574