Odoo Help


Read only field for certain user groups

Marco Antonio Cid Barreras
on 4/30/14, 1:53 PM 3,317 views


Im want to have a field that can only be edited by users of group A, but can be displayed (but not edited / readonly) by users of group B.

How can I achive this in OpenERP? I've tried different methods but all of them completely remove the field for unauthorized groups.



Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
| 5 4 9
Pondicherry, India
--Dhinesh - Technical Consultant, Sodexis Inc--

Passionate coder in Python/OpenERP. Knows Django/Flask MVC frameworks. Did code in Java, PHP.

Contact me at: dvdhinesh.mail@gmail.com

Dhinesh - Technical Consultant, Sodexis Inc
On 4/30/14, 2:35 PM

Hi, you can use this in your py file field...

'name': fields.char('Name', size=128, read=['base.group_userA'], write=['base.group_userB'] )

Read will allow the user group to view and Write will allow the user group to edit the field..

Thanks & if it works accept the answer...

Thanks for the answer it works, unauthorized users can still edit the field but the changes are not saved is there a way to make the field completely uneditable?

Marco Antonio Cid Barreras
on 4/30/14, 4:18 PM

Try this in your xml file... <field name="name" groups="base.group_userB"/>. Now the userB group only can view the field....

Dhinesh - Technical Consultant, Sodexis Inc
on 5/2/14, 2:50 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.


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)


Asked: 4/30/14, 1:53 PM
Seen: 3317 times
Last updated: 9/7/15, 11:26 AM