콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1722 화면

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!


아바타
취소
베스트 답변

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

아바타
취소
작성자

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'):

관련 게시물 답글 화면 활동
3
2월 25
4860
1
7월 24
13121
2
4월 22
3240
1
5월 21
3591
1
6월 19
3906