Odoo Help

3
4
Avatar

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
4282
| 5 5 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 5/14/15, 1:10 AM

You could inherit your FORM view with a particular group access to modify readonly attribute.

Please check the sample code available here 


NOTE:

To add your group:
<field name="groups_id" eval="[(4, ref('MODULE_NAME.GROUP_EXTERNAL_ID'))]"/>

To replace other groups and add your group only: <field name="groups_id" eval="[(6,0,[ref('MODULE_NAME.GROUP_EXTERNAL_ID')])]" />


Thanks for this ans. but this will only set perticuler group to field right? or it will make it readonly that field rest of groups those are not assigned to that field?

Anil R. Kesariya (AKE)
on 5/14/15, 1:21 AM
2
Avatar

Anil R. Kesariya (AKE)

--Anil R. Kesariya (AKE)--
6169
| 7 6 8
Rajkot, India
--Anil R. Kesariya (AKE)--

Odoo Techno Functional Expert

* Engaged with odoo since May - 2012.

* Customise existing module or develop new module base on customer requirement.

* Played key developer role in many past and running projects.

* Expert in requirement gathering of business and transforming requirement into odoo platform.

* Major expertise in core modules, database, report development and theme development.

* Integration expert.


Linkedin  : https://in.linkedin.com/in/anil-kesariya-97b20a66


Anil R. Kesariya (AKE)
On 5/14/15, 1:10 AM

Hi All,

I found solution to achive this goal.

Created boolean field on backend which set true based on parnter onchange method.

That onchange method will search that current logged in user is belongs to that specific group than it will return true for that boolean.

Based on boolean value i have applied attrs on field to make it readonly.

Thanks!




About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

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

3 follower(s)

Stats

Asked: 5/13/15, 11:11 PM
Seen: 4425 times
Last updated: 12/5/17, 10:30 PM