Skip to content

Conversation

@jjmaksoud
Copy link
Contributor

Add a utility function to check if a given module was force installed during the upgrade.
This can be useful when a module is force installed and another module upgrade scripts need to fill in some data for it.

@robodoo
Copy link
Contributor

robodoo commented Dec 11, 2025

Pull request status dashboard

@jjmaksoud
Copy link
Contributor Author

upgradeci retry with always only base

@jjmaksoud jjmaksoud requested review from a team and asno-odoo December 11, 2025 13:19
Add a utility function to check if a given module
was force installed during the upgrade.
This can be useful when a module is force installed
and another module upgrade scripts need to fill in
some data for it.
@jjmaksoud jjmaksoud force-pushed the master-track-force-install-maji branch from 0a2163e to ec6be07 Compare January 5, 2026 10:53

def module_force_installed(module):
"""
Return whether a module is force installed during the upgrade.
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the current implementation we don't know if it was actually installed. It's a set of modules that are going to be attempted to be installed.

I understand that it works for your use case, but either the description or the implementation could be slightly adjusted.

Suggested change
Return whether a module is force installed during the upgrade.
Return whether a module is marked for force install during the upgrade.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know it is not the most accurate description, but given that we use module_installed with the same confidence solely based on the state even if the module is yet to be installed to to be updated, i used a similar description

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think the other one should be reworded then, not taken as an example. It's a minimal change, so it doesn't diminish clarity/readability and it's factually wrong when put this way.

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.

3 participants