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

Hi,

In my custom module I want to allow "create Invoice" button and Invoice Order Button in action menu to specific user of group. I am able to apply group to Create Invoice button not not able to apply it to the Invoice Order Button. 

Could anyone help me to achieve this.

Thanks in advance!

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

this is the original:

         <record id="action_view_sale_advance_payment_inv" model="ir.actions.act_window">

            <field name="name">Invoice Order</field>

            <field name="type">ir.actions.act_window</field>

            <field name="res_model">sale.advance.payment.inv</field>

            <field name="view_type">form</field>

            <field name="view_mode">form</field>

            <field name="target">new</field>

            <field name="groups_id" eval="[(4,ref('sales_team.group_sale_salesman'))]"/>

            <!-- TODO: check if we need this -->

            <field name="binding_model_id" ref="sale.model_sale_order" />

        </record>

then custom it like bellow:

        <record id="sale.action_view_sale_advance_payment_inv" model="ir.actions.act_window">

           <field name="groups_id" eval="  [(6, 0, [ ref('your_module.your_group_users')])] "/> 

        </record>

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

Yes, you can do that. find that menu and put group attribute on that menu,

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 2 24
1392
1
thg 8 22
14108
2
thg 6 20
5439
1
thg 4 24
13157
1
thg 10 19
7099