跳至内容
菜单
此问题已终结
1 回复
3456 查看

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

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
0
10月 25
3
0
10月 25
197
2
10月 25
344
2
9月 25
709
1
9月 25
930