OpenUpgrade
OpenUpgrade copied to clipboard
[Question]Delete unistalled module during the pre-migration ?
Is your feature request related to a problem?
During an update from 14 to 15 I faced a duplicate module name issue on module that are not installed.
Describe the solution you'd like I'm wondering if it could be a great idea to delete all modules that are not installed before executing the apriori.py operations
We don't do it because there can be some module that need to be detected or to be marked as "to install", so this may prevent these operations.
@flotho could you elaborate ? The modules conflicting ? Etc. Thanks !
First, thanks a lot for reacting and explaining. Totally undestood what i missed @pedrobaeza . @legalsylvain I proposed this because of this one https://github.com/OCA/OpenUpgrade/pull/3556 This PR don't solve the issue I've faced. I have both l10n_eu_oss and l10n_eu_service present in my database and if failed because of a duplicate. As both module were not installed, I deleted all the uninstalled modules and then it wok like a charm. Maybe we could combine 2 behaviours :
- First delete all unistalled modules
- Then rescan all the available modules for the current version
- let the process run smoothly
You're feedback will be welcome
Yes, some code like:
modules = env['ir.module.module'].search([('state', '=', 'uninstalled')])
modules.unlink()
env['ir.module.module'].update_list()
may do the trick.