Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2212 มุมมอง

I'm going through access rules tutorial \https://www.odoo.com/documentation/14.0/developer/howtos/rdtraining/B_acl_irrules.html#access-rules

please someone tell me how to paste XML code here in a way it doesn't trim the tags away. I can't even show example of the rule, but you will find it in the link above


It's written that this rule 

Only applies to the “create”, “update” (write) and “delete” (unlink) operations: here we want every employee to be able to see other users’ records but only the author / assignee can update a record.


I don't get it. We haven't even written anything about create/update/unlink in the rule, why does it apply to those operations? Also, the code says (I think) that when the domain is met, read permission should be false, which doesn't make sense at all.

Please explain.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Ameus:

Since the XML does not explicitly specify a value for perm_write, perm_create and perm_unlink, Odoo will assign the default values (True) to these fields when the rule is created.

Here's a link to the code that defines these fields: https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/models/ir_rule.py#L13


Regarding your second question, the rule seems to be just a sample to illustrate the syntax and not an actual working rule. For example, the "ref" is pointing to "model_to_manage".

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 25
454
0
ม.ค. 25
1579
0
ม.ค. 25
1595
User Access Restriction by IP in Odoo แก้ไขแล้ว
1
ธ.ค. 24
2153
2
พ.ย. 24
1725