Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2217 Vizualizări

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.

Imagine profil
Abandonează
Cel mai bun răspuns

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".

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
iun. 25
456
0
ian. 25
1582
0
ian. 25
1595
1
dec. 24
2161
2
nov. 24
1732