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

In Sale->sales order->sales person field need to be lock to all the users except admin.how can i do that i.e:Only administrator can select the sales person from the select field

아바타
취소
베스트 답변

Hi,

Following example will make Salesperson field as readonly if logged in user is not admin . You can apply invisible instead of readonly, if you want to make that field invisible. Make following changes in form view of sale.order object

<field name="user_id" attrs="{'readonly': [('user_id','!=',1)]}"/>

Hope this may help you.

아바타
취소
작성자

But admin should select the sales persons from the list but all other users only need to see their own names.Read only option is not applicable here.

You can apply domain where if user is admin, selection field should show all the users, else only display logged in user's name.

관련 게시물 답글 화면 활동
1
10월 20
3544
0
2월 25
1675
0
1월 25
1424
1
12월 24
1845
1
6월 22
6059