Skip to content

[FIX] openupgrade: fix module name retrieval #410

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

Merged

Conversation

patrickt-oforce
Copy link
Contributor

@patrickt-oforce patrickt-oforce commented Mar 27, 2025

Fix the error indicated in OCA/l10n-spain#4092 after odoo/odoo#202014 merge, and potentially close the issue #409

After Odoo pr #202014 was merged, the 'pkg' key is not present anymore
in 'locals', this because the real migration step is executed outside
of method that prepare data to run the migration(s). The new method
not use the 'pkg' object, but use directly the module name
Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

Diff review.

Not expert here, but looks correct.

thanks for your work.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

I'm still perplexed that Odo has done this change...

@pedrobaeza pedrobaeza merged commit 1dd61b9 into OCA:master Mar 27, 2025
2 checks passed
@patrickt-oforce
Copy link
Contributor Author

I'm still perplexed that Odo has done this change...

The PR of Odoo was originated by the need to use their upgrade library outside of migration process, with this PRs they allow to use the method merge_modules and rename_modules of their library before base is updated

@pedrobaeza
Copy link
Member

Yeah, I mean that breaking change... It's true that we were using an "internal variable" and very specific Python code outside Odoo modules, but their stability policy sometimes is not strict where it should be, and it's the excuse other times for not accepting clear patches. Let's move on and thanks again for finding the issue.

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

Successfully merging this pull request may close these issues.

4 participants