Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6970086
Add 'odoo_repository_migration'
sebalix Aug 31, 2023
d2f5a4b
odoo_repository: add settings panel
sebalix Oct 10, 2023
9311f4c
Apply pre-commit
sebalix Nov 3, 2023
0e3f4dd
odoo_repository_migration: sync data from main node
sebalix Nov 4, 2023
9a40995
o_r_migration: default filters for 'Migrations' menu
sebalix Nov 8, 2023
3bb6be2
odoo_repository_migration: fix sync data from main node
sebalix Nov 22, 2023
6f75e9c
odoo_repository: limit the scan/force-scan to selected branches
sebalix Nov 26, 2023
a7f136a
odoo_repository_migration: ctx key to disable MigrationScanner run
sebalix Nov 27, 2023
b20eeac
odoo_repository: handle git authentication with tokens
sebalix May 2, 2024
b1bf17b
odoo_repository: handle blacklisted modules
sebalix May 10, 2024
c1520c1
odoo_repository_migration: force scan when a migration path is created
sebalix May 23, 2024
ac15818
odoo_repository_migration: limit strictly the scan of migration paths…
sebalix Sep 18, 2024
ea814ba
odoo_repository: split RepositoryScanner jobs in smaller jobs
sebalix Sep 22, 2024
8db2315
odoo_repository_migration: split MigrationScanner jobs in smaller jobs
sebalix Sep 23, 2024
28f30a2
odoo_repository_migration: fix 'push_scanned_data'
sebalix Oct 11, 2024
2c77b50
odoo_repository_migration: fix 'migration_scan' computation
sebalix Oct 14, 2024
51de463
odoo_repository: add User and Manager user groups
sebalix Oct 17, 2024
4395b16
odoo_repository: option to force cloned repository name
sebalix Oct 29, 2024
9488a15
[REF] Allow same module name across different repositories
sebalix Oct 18, 2024
d174da6
odoo_repository_*: rename some filters
sebalix Oct 31, 2024
272f184
fixup! MigrationScanner: upgrade oca-port
sebalix Nov 13, 2024
d5747e5
odoo_repository[_migration]: fix access to 'ir.config_parameter'
sebalix Nov 19, 2024
87d9b9a
odoo_repository_migration: auto-archive 'odoo.module.branch.migration'
sebalix Oct 17, 2024
33edbb8
odoo_repository_migration: fix 'migration_scan' flag
sebalix Oct 17, 2024
2a953ca
odoo_repository_migration: do not force scan when creating a migratio…
sebalix Oct 17, 2024
4d12167
odoo_repository_migration: add tests on 'migration_scan' flag
sebalix Nov 19, 2024
5ff0c51
odoo_repository_migration: fix migration data computation
sebalix Dec 9, 2024
af97fff
odoo_project_migration: handle projects in migration data
sebalix Jan 10, 2025
cd21056
odoo_repository_migration: hide columns by default in 'Migrations' menu
sebalix Feb 28, 2025
4a8be22
odoo_repository_migration: support migration scan between two reposit…
sebalix Mar 13, 2025
54eac9e
odoo_repository_migration: able to qualify a module as renamed or rep…
sebalix Apr 11, 2025
523ed6c
odoo_repository_migration: collect migration data on specific reposit…
sebalix May 28, 2025
a7be94e
odoo_repository_migration: move replaced/renamed modules data in thei…
sebalix Sep 14, 2025
d74c7fa
[UPD] README.rst
OCA-git-bot Dec 3, 2025
d9ce6fc
[ADD] icon.png
OCA-git-bot Dec 3, 2025
7136ffb
[IMP] odoo_repository_migration: update README
sebalix Dec 3, 2025
877334f
[UPD] README.rst
OCA-git-bot Dec 8, 2025
d82b36e
[FIX] odoo_repository_migration: fix module scanning when it is replaced
sebalix Dec 18, 2025
595b2de
[BOT] post-merge updates
OCA-git-bot Dec 18, 2025
28a4c7f
Update all modules manifest and README with new repo info
sebalix Jan 17, 2026
c584126
[BOT] post-merge updates
OCA-git-bot Jan 17, 2026
87c484b
[UPD] Update odoo_repository_migration.pot
Feb 1, 2026
fedce39
Added translation using Weblate (Italian)
mymage Feb 2, 2026
d621f06
[FIX] odoo_repository_migration: fix tests
sebalix Feb 16, 2026
2980fca
[FIX] odoo_repository_migration: explicit commits are not allowed in …
sebalix Mar 27, 2026
86b9e27
[BOT] post-merge updates
OCA-git-bot Mar 27, 2026
4720a6e
[IMP] odoo_repository_migration: pre-commit auto fixes
sebalix Mar 30, 2026
9cb1a5d
[IMP] odoo_repository_migration: pre-commit fixes
sebalix Mar 30, 2026
9669e9e
[MIG] odoo_repository_migration: Migration to 18.0
sebalix Mar 30, 2026
2d3977c
[FIX] odoo_repository: tests, apply git config in repository
sebalix Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions odoo_repository/tests/odoo_repo_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)

import io
import os
import shutil
import tempfile
import threading
Expand Down Expand Up @@ -31,20 +30,10 @@ def setUpClass(cls):
cls.addon = "my_module"
cls.target_addon = "my_module_renamed"
# Create a temporary Git repository
cls._apply_git_config()
cls.repo_upstream_path = cls._get_upstream_repository_path()
cls.addon_path = Path(cls.repo_upstream_path) / cls.addon
cls.manifest_path = cls.addon_path / "__manifest__.py"

@classmethod
def _apply_git_config(cls):
"""Configure git (~/.gitconfig) if no config file exists."""
git_cfg = Path(os.path.expanduser("~/.gitconfig"))
if git_cfg.exists():
return
os.system("git config --global user.email 'test@example.com'")
os.system("git config --global user.name 'test'")

@classmethod
def _get_upstream_repository_path(cls) -> Path:
"""Returns the path of upstream repository.
Expand Down Expand Up @@ -95,7 +84,9 @@ def _unarchive_upstream_repository(cls, archive_data: bytes) -> Path:
def _create_tmp_git_repository(cls) -> Path:
"""Create a temporary Git repository to run tests."""
repo_path = tempfile.mkdtemp()
git.Repo.init(repo_path)
repo = git.Repo.init(repo_path)
repo.config_writer().set_value("user", "name", "test").release()
repo.config_writer().set_value("user", "email", "test@example.com").release()
return Path(repo_path)

@classmethod
Expand Down
150 changes: 150 additions & 0 deletions odoo_repository_migration/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==============================
Odoo Repository Migration Data
==============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:568479ec26f358ee26894cc3b2409f3337827426661abba55f0e3f3b8db19cc3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmodule--composition--analysis-lightgray.png?logo=github
:target: https://github.com/OCA/module-composition-analysis/tree/16.0/odoo_repository_migration
:alt: OCA/module-composition-analysis
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/module-composition-analysis-16-0/module-composition-analysis-16-0-odoo_repository_migration
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/module-composition-analysis&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module collects and records modules migration data from Odoo
repositories.

Thanks to `oca-port <https://github.com/OCA/oca-port/>`__ and data
collected by ``odoo_repository``, this module will generate migration
data on each module for declared migration paths (e.g. 16.0 -> 18.0).

Also, for specific cases you can declare what a module became in a given
Odoo version, like OCA ``web_domain_field`` replaced by standard Odoo
module ``web`` starting from 17.0 (with an optional explanation that
could help users, like how to use this new module compared to the
previous one).

Given a migration path, a module can get one of this migration status:

+-----------------------------+----------------------------------------+
| Status | Description |
+=============================+========================================+
| *Fully Ported* | All commits from source version are |
| | present in target version |
+-----------------------------+----------------------------------------+
| *To migrate* | The module doesn't exist on target |
| | version |
+-----------------------------+----------------------------------------+
| *Ported (missing commits?)* | Some commits from source version are |
| | not ported in target version (could be |
| | false-positive) |
+-----------------------------+----------------------------------------+
| *To review* | A migration PR has been detected |
+-----------------------------+----------------------------------------+
| *Replaced* | The module has been replaced by |
| | another one (not sharing the same git |
| | history) |
+-----------------------------+----------------------------------------+
| *Moved to standard?* | The module name has been detected in |
| | Odoo standard repositories for target |
| | version. High chance this module is or |
| | should be replaced by another one |
| | instead (by creating a timeline), so |
| | it mainly helps to detect such cases. |
+-----------------------------+----------------------------------------+
| *Moved to OCA* | the module name is available in an OCA |
| | repository (could be a false-positive |
| | because sharing the same name, in such |
| | case a timeline has to be created) |
+-----------------------------+----------------------------------------+
| *Moved to generic repo* | a specific module (only available in a |
| | project) in source version now exists |
| | in a generic repository (could be a |
| | false-positive if both modules have |
| | only their name in common) |
+-----------------------------+----------------------------------------+

It helps to build a consolidated knowledge database accross different
Odoo versions for everyone: functionals and developers.

**Table of contents**

.. contents::
:local:

Usage
=====

To enable this feature, the option *Collect migration data* should be
enabled on repositories (opt-in).

To record what a module became starting from a given Odoo version, you
should do it through the *Odoo Repositories / Data / Modules /
Timelines* menu.

Once the scheduled action ran, the migration data are available on each
module in *Migration* tab, or through the *Odoo Repositories / Data /
Modules / Migrations* menu.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/module-composition-analysis/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/module-composition-analysis/issues/new?body=module:%20odoo_repository_migration%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Camptocamp

Contributors
------------

- Camptocamp

- Sébastien Alix <seb@usr-src.org>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/module-composition-analysis <https://github.com/OCA/module-composition-analysis/tree/16.0/odoo_repository_migration>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions odoo_repository_migration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import update_oca_repositories
30 changes: 30 additions & 0 deletions odoo_repository_migration/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2023 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Odoo Repository Migration Data",
"summary": "Collect modules migration data for Odoo Repositories.",
"version": "18.0.1.0.0",
"category": "Tools",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/module-composition-analysis",
"data": [
"security/ir.model.access.csv",
"data/queue_job.xml",
"views/odoo_migration_path.xml",
"views/odoo_module_branch.xml",
"views/odoo_module_branch_migration.xml",
"views/odoo_module_branch_timeline.xml",
"views/odoo_repository.xml",
],
"installable": True,
"depends": [
"odoo_repository",
],
"external_dependencies": {
"python": [
"oca-port",
],
},
"license": "AGPL-3",
"post_init_hook": "update_oca_repositories",
}
29 changes: 29 additions & 0 deletions odoo_repository_migration/data/queue_job.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 Camptocamp SA
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="queue_job_channel_scan_migration" model="queue.job.channel">
<field name="name">odoo_repository_scan_migration</field>
<field name="parent_id" ref="queue_job.channel_root" />
</record>

<record
id="queue_job_function_odoo_repository_scan_migration_paths"
model="queue.job.function"
>
<field name="model_id" ref="model_odoo_repository" />
<field name="method">_scan_migration_paths</field>
<field name="channel_id" ref="queue_job_channel_scan_migration" />
<field name="retry_pattern" eval="{1: 1, 5: 5, 10: 10, 15: 30}" />
</record>

<record
id="queue_job_function_odoo_repository_scan_migration_module"
model="queue.job.function"
>
<field name="model_id" ref="model_odoo_repository" />
<field name="method">_scan_migration_module</field>
<field name="channel_id" ref="queue_job_channel_scan_migration" />
<field name="retry_pattern" eval="{1: 1, 5: 5, 10: 10, 15: 30}" />
</record>
</odoo>
14 changes: 14 additions & 0 deletions odoo_repository_migration/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)


def update_oca_repositories(env):
"""Configure OCA repositories to collect migration data."""
org = env["odoo.repository.org"].search([("name", "=", "OCA")])
if org:
repositories = (
env["odoo.repository"]
.with_context(active_test=False)
.search([("org_id", "=", org.id)])
)
repositories.write({"collect_migration_data": True})
Loading
Loading