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

Hi. I am working with Odoo Enterprise 16.4e+

Below is error modal when a non-administrator user tried to add new product in Inventory.

I want to change the message with my language, is it possible to do this?
I tried looking for the code in Technical>UI>Views but didn't find things related to the modal. 

Any help will be appreciated. Thanks!


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

Hi,
You cannot change this message box, but for this particular case, you can write an automated action, which runs during the creation of product.category and if this user doesn't have this user group, you can raise a user error, which will be much more cleaner than this.

Thanks

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

Ahh nice solution but where to put the condition to detect that the current user is administrator or not? if you can give example that will be great

if env.user.has_group('base.group_system'):

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 2 25
4802
1
thg 7 24
13053
2
thg 4 22
3168
1
thg 5 21
3554
1
thg 6 19
3851