Version 12
I have defined an object called order. In my application, the user "order_entry" is supposed to have read and write rights for orders, for which he has been assigned (user_id = user.id) and which are in the state "draft".
If he has not been assigned, he has read rights but no write rights for all orders in state "draft".
I defined an access_right for user "order_entry" in ir.model.access.csv (perm_read=1,perm_write=0) and then defined two records in security.xml, one for <field name="domain_force">["&",('state','=','draft'),('user_id','=', 'user.id')]</field> with
<field name="perm_write" eval="1"/> and one record for
domain_force
(user_id != user.id)
.
When I run the code, the user has no write rights, even on orders, for which he is assigned. So <field name="perm_write" eval="1"/>
doesnt seem to work here.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
1
ตอบกลับ
2098
มุมมอง
If the Order Entry user doesn't have "write" access to orders, then the Record Rule cannot override it. So you need to grant read / write / create access first and then limit that with Record Rules.
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
0
มิ.ย. 25
|
349 | ||
|
0
ม.ค. 25
|
1448 | ||
|
0
ม.ค. 25
|
1496 | ||
User Access Restriction by IP in Odoo
แก้ไขแล้ว
|
|
1
ธ.ค. 24
|
1976 | |
|
0
พ.ค. 24
|
1543 |