Hi everyone, I created an addons by setting the rules to user, supervisor, manager. Now I would like to install the survey addon and automatically set the rules user to manager if he is manager in my module.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
1
Trả lời
1894
Lượt xem
Hi
Please go through the code for record rules
<record id="give_a_unique_record_id" model="ir.rule">
<field name="name">module_name.user</field> // Name of your choice
<field name="model_id" ref="module_name.model_account_analytic_line"/>
<field name="domain_force">[(1, '=', 1)]</field> // This will give access to all records unconditionally.
<field name="groups" eval="[(4, ref(custom_module.group_manager'))]"/> To set groups
<field name="perm_create" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_unlink" eval="1"/>
<field name="perm_read" eval="1"/>
// You can give the permission to create,read,write,unlink according to your system.
</record>
To know more about record rules , please take a look at : https://www.cybrosys.com/blog/record-rules-in-odoo-14
Hope it helps
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
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 | |
---|---|---|---|---|
Add images to Odoo Survey Questions
Đã xử lý
|
|
2
thg 6 25
|
2426 | |
|
0
thg 7 23
|
2338 | ||
|
1
thg 4 23
|
10241 | ||
|
0
thg 10 22
|
2893 | ||
|
1
thg 3 22
|
6186 |