Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3467 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 25
3
0
thg 10 25
209
2
thg 10 25
360
2
thg 9 25
715
1
thg 9 25
938