コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
1250 ビュー

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.

アバター
破棄
著作者 最善の回答

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

アバター
破棄
最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
1
11月 24
1516
0
2月 24
1415
0
8月 21
2401
1
6月 19
4305
1
9月 20
5987