I tried to apply a record rules on
'Administration/Settings' (group_id: base.group_system) group
but It does not work
(4,ref('base.group_system'))
I tried to apply a record rules on
'Administration/Settings' (group_id: base.group_system) group
but It does not work
(4,ref('base.group_system'))
Hi,
Please provide more information like which model, which domain you applied in your record rule etc.
Record rules in odoo: https://www.youtube.com/watch?v=p8gj1dEfYUM
Thanks
<record id="hr_payroll_structure_saas_view_rule" model="ir.rule">
<field name="name">hr_payroll_structure_saas_view_rule</field>
<field name="model_id" ref="hr_payroll.model_hr_payroll_structure"/>
<field name="domain_force">[('company_id.id', '=', user.company_id.id)]</field>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="1"/>
<field name="groups" eval="[(4,ref('base.group_system'))]"/>
</record>
Make a seperate group and assign the group in your record rule where you will give model and domain for the records. And then assign your user to that group. The rule will work for that specific group members in that model records.
Thanks & Regards,
Brain Station 23 Ltd.
Mobile: (+880) 1404055226
Email: sales@brainstation-23.com
Web: https://brainstation-23.com/
Address: (Building-1) 8th Floor, 2 Bir Uttam AK Khandakar Road, Mohakhali C/A, Dhaka 1212, Bangladesh
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký| Bài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
|---|---|---|---|---|
|
0
thg 6 23
|
14 | |||
|
1
thg 7 22
|
3489 | |||
|
1
thg 6 20
|
4268 | |||
|
0
thg 6 20
|
4208 | |||
|
1
thg 2 24
|
4195 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Hi
Please check the documentation,
https://www.cybrosys.com/blog/how-to-create-record-rule-in-odoo-16
Hope it helps