Skip to content

[16.0][FIX] fastapi: Running User Rule Domain#545

Merged
OCA-git-bot merged 1 commit into
OCA:16.0from
acsone:oca-port-fastapi-17.0-to-16.0-2bc098
Jun 19, 2025
Merged

[16.0][FIX] fastapi: Running User Rule Domain#545
OCA-git-bot merged 1 commit into
OCA:16.0from
acsone:oca-port-fastapi-17.0-to-16.0-2bc098

Conversation

@lmignon

@lmignon lmignon commented Jun 17, 2025

Copy link
Copy Markdown
Contributor

backport of #541

@lmignon lmignon added this to the 16.0 milestone Jun 17, 2025

@Tisho99 Tisho99 left a comment

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.

LGTM

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

@lmignon

lmignon commented Jun 19, 2025

Copy link
Copy Markdown
Contributor Author

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-545-by-lmignon-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 9e2c378 into OCA:16.0 Jun 19, 2025
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at c91304c. Thanks a lot for contributing to OCA. ❤️

@lmignon
lmignon deleted the oca-port-fastapi-17.0-to-16.0-2bc098 branch June 19, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants