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

In the Invoices screen in the Action drop down menu, I want the "Confirm Draft Invoices" to be visible to only specific group of users. Can anyone tell me whether can i apply group tag to this or not?

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

Hello

Add groups attribute into the submenu item of Action menu. You have to do the change like below code.

 for eg, 

<act_window id="account.action_account_invoice_confirm"
            multi="True"
            groups="your group id"
            key2="client_action_multi"
            name="Confirm Draft Invoices"
            res_model="account.invoice.confirm"
            src_model="account.invoice"
            view_mode="form" target="new" view_type="form" />
Ảnh đại diện
Huỷ bỏ
Tác giả

Mitul, Thanks for clearing it up, I was wondering whether I could add group tag to it or not. +1

Tác giả

Mitul, any idea how to properly inherit it?

yeah it will work.

Tác giả

Silverstar, any idea how to properly inherit this action?

you can inherit like this.

<act_window id="account.action_account_invoice_confirm"

groups="base.groups"/>

or you can use below way too.

<record id="account.action_account_invoice_confirm" model="ir.actions.act_window">

<field name="groups">base.group_user</field>

</record>

Tác giả

This worked. Thanks

Câu trả lời hay nhất

Hi Sammer,


Mitul answer is correnct only.

You need to inherit base action like this.

<act_window id="module_name.action_id"
etc.../>

Regards,
Silvestar
Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you

Câu trả lời hay nhất

Does anyone know how to inherit the above code to modify it?

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

Does anyone know how to inherit the above code to modify it?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 18
5529
1
thg 8 22
7053
1
thg 4 19
4199
5
thg 5 25
9393
1
thg 4 25
136