コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
5957 ビュー

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
3378
0
2月 25
1462
0
1月 25
1222
1
12月 24
1615
1
6月 22
5790