[19] Question: migration of module_change_auto_install to Odoo 19

Aperta
#3,370 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start with the module_change_auto_install addon's manifest-patching code, which the reporter says hooks odoo.modules.module.load_manifest, and compare it with the proposed hook on odoo.modules.module._load_manifest under Odoo 19's Manifest API. The issue has no settled answer on the hook or on the target branch, and no 19.0 branch was confirmed, so get a maintainer decision on both before writing a patch. Done means the auto_install overrides from modules_auto_install_disabled and modules_auto_install_enabled take effect on Odoo 19 when the module is listed in server_wide_modules.

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

Descrizione

Hello OCA team,

We are migrating to Odoo 19 and noticed that module_change_auto_install no longer takes effect when listed in server_wide_modules. In 18.0 it worked fine.

Root cause observed

  • In Odoo 19, the manifest pipeline moved to the new Manifest API.
  • Patching odoo.modules.module.load_manifest (as in 18) no longer intercepts manifest parsing.

Working approach we implemented locally

  • Hook odoo.modules.module._load_manifest and apply the same auto_install enable/disable overrides there.
  • Keep reading settings from config/env (modules_auto_install_disabled / modules_auto_install_enabled).
  • Removed <=18 compatibility in our patch to keep it 19-only.

Key details

  • We set auto_install to False for disabled modules and to the set of dependencies (or empty set) for enabled modules, following Odoo 19’s rules (triggers must be dependencies now).
  • On startup we log e.g.: “Hooked odoo.modules.module._load_manifest (Odoo 19+)” and per-module changes.

Questions

  1. Is targeting _load_manifest the right hook for Odoo 19 in this addon? Any preferred alternative?
  2. Could you please advise on the correct target branch for a PR? I don’t currently see/track a 19.0 branch for server-tools module_change_auto_install. If you create/confirm the 19.0 branch, I can open a PR right away.

Testing

  • We used Odoo’s test harness with --test-enable / --test-tags on a fresh DB to validate basic manifest reading and config parsing.

Happy to contribute the patch and minimal doc note about the Odoo 19 behavior change (auto-install triggers must be declared dependencies).

Thanks!

— Milan Topuzov

Lingua principale
Python
Stelle
960
Fork
1.7k
Merge medio
7g 17h
PR unite (30g)
9

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/server-tools

Tutte le issue di OCA/server-tools

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.