Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3474 Ansichten

? how can i hide report actions and make it appears just in  work  flow specific  state 

Avatar
Verwerfen
Beste Antwort

Hi,

Try this code


<record id="view_custom_model_form" model="ir.ui.view">
<field name="name">custom.model.form</field>
<field name="model">custom.model</field>
    <field name="inherit_id" ref="base.view_partner_form" />
    <field name="arch" type="xml">
            <!-- Modify the existing report actions -->
<xpath expr="//button[@name='action_print_report']" position="attributes">
<attribute name="groups">module.group_report_access</attribute>
<attribute name="attrs">{"invisible": [["state", "!=", "specific_state"]]}</attribute>

                <!-- You can add your own domains and default conditions under the attribute -->
            </xpath>
    </field>
</record>

Hope it helps

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Okt. 25
3
0
Okt. 25
268
2
Okt. 25
372
2
Sept. 25
723
1
Sept. 25
946