Skip to Content
Menu
This question has been flagged
1 Reply
3619 Views

Dear Support:

Our installation in Odoo 11.0 has a multi-company environment composed of a parent company to which child companies are subordinated. There are users who belong to one of the child companies that are allowed  only  to see the information of the employees of the rest of the companies and yet can only update the information of the employees of their own company.
​ Can this be achieved without creating 2 users for the same person?  

Please, I would appreciate any suggestions in this regard. Thanks in advance!

Best regards,

Claudio Zayas



Avatar
Discard
Best Answer

Hi, To make it you need to define a Record Rules Security.

You can understand the Record Rules Security Concept at this link: \https://www.odoo.com/documentation/12.0/reference/security.html#record-rules

In your case, you need to override the existing Employee Record Rules or define your owns. 

Find here an example to allow all user to read any record of your model (your.model):

<record id="your_group_id_rule" model="ir.rule">
<field name="name">your.group.id.rule.name</field>
<field name="model_id" ref="model_your_model"/>
<field name="domain_force">
[(1, '=', 1)]
</field>
<field name="groups" eval="[
(4, ref('base.group_user'))
]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
</record>
Avatar
Discard
Author

Thanks Frejus Arnaud!, I'll check that out.

Related Posts Replies Views Activity
7
Jun 20
35950
3
Nov 24
347
0
Nov 24
150
4
Sep 24
1486
2
Aug 24
350