跳至内容
菜单
此问题已终结
1 回复
5934 查看

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
3315
0
2月 25
1336
0
1月 25
1150
1
12月 24
1498
1
6月 22
5640