Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] partner_multi_company: remove unnecessary rule rewrite hooks #761

Draft
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

yajo
Copy link
Member

@yajo yajo commented Jan 29, 2025

Now that base_multi_company supports ('company_id', 'in', some_ids + [False]) domains since #760, it's time to remove the (un)install hooks that changed those rules.

The fix is important when migrating a database from previous versions where these hooks didn't exist. In those cases, users wouldn't be able to browse some partners, getting a weird AccessError.

FWIW, upstream rules changed for performance, so the uninstall hook had to be changed nevertheless.

Draft until:

Instructions for functional tests: This refactor is internal and should not be noticed functionally. The module partner_multi_company should work just as always. If so, then this is good.

@moduon MT-8863

Now that `base_multi_company` supports `('company_id', 'in', some_ids + [False])` domains since OCA#760, it's time to remove the (un)install hooks that changed those rules.

The fix is important when migrating a database from previous versions where these hooks didn't exist. In those cases, users wouldn't be able to browse some partners, getting a weird `AccessError`.

FWIW, [upstream rules changed for performance][2], so the uninstall hook had to be changed nevertheless.

[2]: odoo/odoo@a04df5c#diff-1f2cafa0e26df218210181c72e599c279fd093c4215d1dc1da5ef8875195e6c2L23-R23

@moduon MT-8863
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant