Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
5978 Näkymät

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

Avatar
Hylkää
Paras vastaus

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.

Avatar
Hylkää
Tekijä

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.

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
lokak. 20
3410
0
helmik. 25
1497
0
tammik. 25
1254
1
jouluk. 24
1661
1
kesäk. 22
5866