Skip to content

[18.0][MIG] odoo_project#140

Merged
OCA-git-bot merged 38 commits intoOCA:18.0from
sebalix:18.0-mig-odoo_project
Apr 3, 2026
Merged

[18.0][MIG] odoo_project#140
OCA-git-bot merged 38 commits intoOCA:18.0from
sebalix:18.0-mig-odoo_project

Conversation

@sebalix
Copy link
Copy Markdown
Collaborator

@sebalix sebalix commented Apr 3, 2026

No description provided.

sebalix and others added 30 commits April 3, 2026 10:57
Module listing all modules belonging to an Odoo project by leveraging
the data provided by 'odoo_repository'.
This new data model is here to distinguish available upstream modules
and installed modules in a project.

It inherits from `odoo.module.branch` so it has access to all its data,
but is linked to an `odoo.project` and has its own `installed_version`
so it becomes easy to find modules that could be upgraded within a
project.
New boolean field on installed modules to tell if some migration scripts
have to be played between the installed version and the latest version
available.
This allows to declare projects not yet live for instance, by listing
only modules we would like to install in it.
This allows to get figures from projects before actually launching them
(gap analysis...), or to study a project to recover from another Odoo
integrator for instance.
RepositoryScanner jobs could be quite long to execute on a repository
(like 'odoo/odoo'), and depending on your Odoo config or your monitoring tools,
such job could get killed before it ends up its work.

While there is no issue to get the RepositoryScanner job killed and
restarted later, it'll re-analyze the branch to scan to detect again the
modules it has to scan, and this process itself could take ages before
it re-starts the scan of the modules themselves.

This commit is splitting these two tasks:
- one job to detect modules to scan for a given repository/branch
- one job created for each module to scan

All of these jobs are depending on each other so we ensure that they are
run sequentially (one branch after another, and one module after another)
so only one job is running for a given repository at a time.
We also ensure that no more than one job can be spawned by the user from UI.

This results in a higher number of jobs, but scanning can be recovered
easily.
This change allows to get a module `x` present in different
repositories (unicity constraint on `odoo.module.branch` has changed
accordingly). This is useful in case two projects have `x` installed but
the code of these modules (that can be different) are hosted in their
own project repository.

Therefore, the scan of repositories and project modules import have been
adapted to fullfil this new possibility.

Features:
    - allows multiple instances of `<odoo.module.branch>` records
      sharing the same module technical name and branch but belonging to
      different repositories,
    - repositories have now a new `specific` flag, propagated to their
      modules.. By default they host generic modules, but project repositories
      will host specific modules that cannot be shared to other projects,
    - a generic module cannot depend on a specific module
    - when importing modules in a project, specific modules of other
      projects cannot be mapped,
    - once a specific module is scanned in a project repository, relevant
      orphaned modules installed in a project will be re-mapped to this newly
      created specific module,
    - detect PR only on generic modules (unmerged/pending modules are
      generic only, specific modules have to be found in project
      repositories).
@sebalix sebalix force-pushed the 18.0-mig-odoo_project branch from b9cdc1d to ec93551 Compare April 3, 2026 11:44
@sebalix sebalix added this to the 18.0 milestone Apr 3, 2026
@sebalix sebalix force-pushed the 18.0-mig-odoo_project branch from ec93551 to 9413752 Compare April 3, 2026 11:50
@sebalix sebalix marked this pull request as ready for review April 3, 2026 12:27
@sebalix
Copy link
Copy Markdown
Collaborator Author

sebalix commented Apr 3, 2026

Tested locally, working

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-140-by-sebalix-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 018fcf1 into OCA:18.0 Apr 3, 2026
5 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 93380f8. Thanks a lot for contributing to OCA. ❤️

@sebalix sebalix deleted the 18.0-mig-odoo_project branch April 3, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants