Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
1374 Ansichten

Hello, 

I have a group of users I would like to only see (create, update, delete) contact records that were created by them, AND, contact records created by others which have a specific field attribute (for example, field relationship = shared).


I am assuming this is to be implemented with record rules, but I am coming up short on expressing the rule to achieve that. 


I am using Odoo SaaS (Cloud). 


Any recommendations on how to best approach this scenario is greatly welcome.

Avatar
Verwerfen
Autor Beste Antwort

Thanks for your comment. Can this be an expression instead of writing an xml? I use Odoo SaaS in the cloud, and thought I´d be able to express this under Settings->Technical->Security->Record Rules

Avatar
Verwerfen
Beste Antwort

Hi,


Create record rule as follows:

<record id="rule_contact_limited_access" model="ir.rule">

    <field name="name">Contact Limited Access</field>

    <field name="model_id" ref="base.model_res_partner"/>

    <field name="domain_force">['|', ('create_uid', '=', user.id), ('relationship', '=', 'shared')]</field>

    <field name="groups" eval="[(4, ref('group_id'))]"/>

</record>


Hope it helps

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Nov. 24
1626
0
Feb. 24
1484
0
Aug. 21
2509
1
Juni 19
4391
1
Sept. 20
6121