Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5984 มุมมอง

I want to hide the edit button for a user with a specific group in the javascript.

I tested it with this, but this is not working right:

users.call('has_group', ['test_module.group_first_manager']).done(function (is_employee) { if (is_employee) { this.$button.find('.o_form_button_edit').hide(); } else { this.$button.find('.o_form_button_edit').show(); } });


I want to remove the edit button for users that are in the gropu = 'group_first_manager'

So have anyone an input for me to fix my problem?

Thank you





อวตาร
ละทิ้ง

Hii why did you not do this using access control list. Using access control list you gives access of following.

1- Read

2- Write

3- Create

4- Delete

for a particular group of user.

ผู้เขียน

I want to know if this is possible in the javascript of Odoo. I could do it like you said thats right. thx

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 15
2900
2
ก.ย. 22
4027
0
มี.ค. 19
2728
1
มี.ค. 15
5948
1
พ.ย. 21
5809