콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
1445 화면

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
1663
0
2월 24
1502
0
8월 21
2531
1
6월 19
4414
1
9월 20
6196