Skip to content

[19] Question: migration of module_change_auto_install to Odoo 19 #3370

@heyagent

Description

@heyagent

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions