Odoo Help

0

user authorisation for single field

By
shafeequemonp
on 4/23/14, 9:25 AM 1,384 views

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

1

Nehal

--Nehal--
2108
| 5 2 8
Ahmadabad, India
--Nehal--
Nehal
On 4/23/14, 9:37 AM

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.

shafeequemonp
on 4/24/14, 1:57 AM

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

Nehal
on 4/28/14, 9:00 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 4/23/14, 9:25 AM
Seen: 1384 times
Last updated: 3/16/15, 8:10 AM