コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2210 ビュー

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

アバター
破棄
関連投稿 返信 ビュー 活動
0
6月 25
449
0
1月 25
1579
0
1月 25
1595
1
12月 24
2153
2
11月 24
1722