Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[16.0] openupgrade_framework : patched method migrate_module should change load_state for end-migration scripts to be run at install

Aperta
#4,106 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Una pull request collegata è già stata integrata.

  • #4107 di @metaminux — integrata

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
12/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

The patched migrate_module in the openupgrade_framework module sets the module state but not load_state, which the upstream odoo/modules/migration.py reads for end-migration scripts. Linked pull request #4107 is already merged, so first check whether that merge covers the change and whether the issue can be closed. If it does not, the remaining work is to set load_state alongside state in the patch and confirm an end-migration script runs on install.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug no stale

Module

openupgrade_framework

Describe the bug

In order to run migration scripts at install also, migrate_module method is patched to modify the module state field.
But in the original method, when dealing with end-migration scripts, state is initialized using load_state field

https://github.com/odoo/odoo/blob/9034602a028fb22fbd139cf41a2f5c71d9d8d032/odoo/modules/migration.py#L106-L110

So we need to modify the load_state field also for end-migration to run at install

To Reproduce

Affected versions: 16.0

Steps to reproduce the behavior:

  1. Create a end-migration script in module that is not yet installed but will be (with new dependency in another module)
  2. Launch the migration

Expected behavior
The end-migration script should be run

Lingua principale
Python
Stelle
995
Fork
837
Merge medio
2g 8h
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OCA/OpenUpgrade

Tutte le issue di OCA/OpenUpgrade

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.