Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fastapi/security/ir_rule+acl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<field name="model_id" ref="base.model_res_partner" />
<field
name="domain_force"
> ['|', ('user_id', '=', user.id), ('id', '=', authenticated_partner_id)]</field>
> ['|', ('user_ids', '=', user.id), ('id', '=', authenticated_partner_id)]</field>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tisho99 wouldn't it be more accurate to write ('user_ids', 'in', user.id) ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmignon

Everything works with the Odoo ORM because they've designed their operators that way, but from what I know, the most commonly used nomenclature is the equals operator and the following: ('user_ids', 'in', [user.id]).

I think the most readable way would be to use the "like" operator, but I think it's also slower.

<field name="groups" eval="[(4, ref('group_fastapi_endpoint_runner'))]" />
</record>

Expand Down