[19.0][MIG] odoo_repository - #149
Open
alan196 wants to merge 160 commits into
Open
Conversation
added 30 commits
July 29, 2026 06:34
Module to build and maintain an exhaustive list of Odoo modules and their metadata: - dependencies between them - license - authors - maintainers - lines of code - ...
And handle GitHub token.
This could be an external package published on PyPI, but include it in `odoo_repository` module for now to ease deployment.
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.
…mmit_of_git_tree'
If new commits since the last scan are updating irrelevant files regarding the collection of migration data (like PO files updated automatically by Weblate), then we skip the scan as this is a process that can be quite time consuming. Even if the scan has been skipped we still push the last source and target commits to Odoo.
As the RepositoryScanner (executed before MigrationScanner) has already fetched the branches of the repository, we avoid to fetch them again so the MigrationScanner will work on the local history of commits. This allows to speed up the processing of related jobs. Without new commits in repositories, a scan of all Odoo + OCA repositories now takes about ~6min instead of ~13min.
Allows to run the tests locally in isolated environment like Docker.
Instead of global level as the user running the scanner could not have write access to ~/.gitconfig. As such, the configuration is done after the cloning of repository, right before the fetch and later on the checkout (which is the operation that consumes most of the memory, the configuration is here to reduce it). Cloning operation itself is faster and consumes less memory with 'filter=blob:none' parameter.
Do not maintain the list of OCA repositories manually anymore, but sync it automatically with https://github.com/OCA/repo-maintainer-conf. All repositories having a default branch set to `master` or `main` will be skipped (such repositories are not hosting Odoo modules). Others like OpenUpgrade or OCB will be skipped too.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: module-composition-analysis-18.0/module-composition-analysis-18.0-odoo_repository Translate-URL: https://translation.odoo-community.org/projects/module-composition-analysis-18-0/module-composition-analysis-18-0-odoo_repository/
And cache generated git repository in memory to speed up tests execution.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: module-composition-analysis-18.0/module-composition-analysis-18.0-odoo_repository Translate-URL: https://translation.odoo-community.org/projects/module-composition-analysis-18-0/module-composition-analysis-18-0-odoo_repository/
This was referenced Jul 29, 2026
When the GitHub API rate limit is reached (403/429 responses), jobs were retried with the standard retry pattern until reaching the max. retries, ending up as failed jobs and spamming administrators with emails while still hammering the API for each repository/module. Detect rate limit responses (Retry-After / X-RateLimit-* headers) and postpone the job until the limit is reset, without increasing its retry counter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Some Odoo standard modules (e.g. l10n_ve 14.0) define the manifest 'author' key as a list. As _get_author_ids() is decorated with ormcache, the cache key hashing crashed with 'TypeError: unhashable type: list' before even entering the method, making the scan job fail. Convert the list to a tuple before calling the cached method. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Some modules ship files that odoo_addons_parser cannot handle, e.g. nested <odoo> tags in XML data files that Odoo itself tolerates (l10n_ro_stock_account 14.0, auth_impersonate_user 17.0...). The scan job kept retrying and failing on them forever. Log a warning and push an empty code analysis instead, so the scan completes and the module is still registered with its manifest-less data. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sebalix
reviewed
Aug 6, 2026
sebalix
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for your PRs and the fixes you included as well, I'll check them in ~2 weeks 👍
Regarding the commit [FIX] odoo_repository: do not fail scan on module code analysis error , it's probably linked to this issue: sebalix/odoo-addons-parser#18
I would prefer to fix odoo-addons-parser instead if you don't mind.
| @@ -0,0 +1,4 @@ | |||
| # generated from manifests external_dependencies | |||
| gitpython | |||
Collaborator
There was a problem hiding this comment.
You can add oca-port to make CI running
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration of odoo_repository to 19.0.
Main changes for 19.0 compatibility:
_sql_constraintstomodels.Constraint(old attribute no longer supported).odoo.osv.expressionhelpers withodoo.fields.Domain.@api.returns(removed in 19.0, RPC layer now converts recordsets to ids).fields.first()(removed) with recordset slicing.self._crwithself.env.cr.res.groupscategory_idto the newres.groups.privilegemodel.groups_idonir.ui.viewrecords (field removed; ACLs already restrict access).<group expand=...>in search views (no longer valid).target="inline"on the settings action.self.env._for translations.