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

[16.0][MIG] project_administrator_restricted_visibility: Migration to 16.0 #1222

Conversation

edlopen
Copy link
Member

@edlopen edlopen commented Jan 24, 2024

Standard migration of the project_administrator_restricted_visibility.

MT-4844

@moduon

@yajo yajo added this to the 16.0 milestone Jan 24, 2024
@edlopen edlopen mentioned this pull request Jan 24, 2024
38 tasks
Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Code looks good!

One minor guideline missing to follow.

Also, rebase fixing your committer email as we discussed privately.

To let the bot auto-add this as the migration PR for the module, we issue this command:

/ocabot migration project_administrator_restricted_visibility

@edlopen edlopen force-pushed the 16.0-mig-project_administrator_restricted_visibility branch from d5c92a8 to ec215a3 Compare January 24, 2024 10:13
Copy link

@EmilioPascual EmilioPascual left a comment

Choose a reason for hiding this comment

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

LGTM

@edlopen edlopen force-pushed the 16.0-mig-project_administrator_restricted_visibility branch from ec215a3 to 3c87a06 Compare January 24, 2024 10:44
@NachoAlesLopez
Copy link

Code looks good and the module works perfectly fine. I did find a small issue. When trying to uninstall the module, it throws this error:

image

It seems to be related to the uninstall hook. In older versions of Odoo (13 and lower), the field groups of ir.rule didn't have the ondelete constraint (https://github.com/odoo/odoo/blob/13.0/odoo/addons/base/models/ir_rule.py#L22) but newer version have added it (https://github.com/odoo/odoo/blob/16.0/odoo/addons/base/models/ir_rule.py#L23). Can you check this error out?

@edlopen edlopen force-pushed the 16.0-mig-project_administrator_restricted_visibility branch from 3c87a06 to 44a3d32 Compare January 25, 2024 08:09
@edlopen
Copy link
Member Author

edlopen commented Jan 25, 2024

Thanks @NachoAlesLopez . It seems that this bug has existed since version 14. I just fixed the uninstall hook so that it first removes the group from the rule and then deletes it.

Copy link

@NachoAlesLopez NachoAlesLopez left a comment

Choose a reason for hiding this comment

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

Thanks and great job, @edlopen! Just tested it and the module uninstalled successfully.

@edlopen edlopen force-pushed the 16.0-mig-project_administrator_restricted_visibility branch from 44a3d32 to f39afe5 Compare January 26, 2024 10:01
Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Great job with that test! 🎉

One minor fix to be ready

@edlopen edlopen force-pushed the 16.0-mig-project_administrator_restricted_visibility branch from f39afe5 to 8cc2be4 Compare January 26, 2024 12:50
@edlopen edlopen force-pushed the 16.0-mig-project_administrator_restricted_visibility branch from 8cc2be4 to 5f67a66 Compare January 26, 2024 12:54
Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-1222-by-yajo-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 4771089 into OCA:16.0 Jan 29, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

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.

7 participants