Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to split an Obeesdoo module #414

Open
victor-champonnois opened this issue Jun 15, 2022 · 0 comments
Open

How to split an Obeesdoo module #414

victor-champonnois opened this issue Jun 15, 2022 · 0 comments

Comments

@victor-champonnois
Copy link
Member

victor-champonnois commented Jun 15, 2022

@robinkeunen This is a proposition of a guide to split modules. (some very specific steps are needed, and are gathered here).

Migration

  • Sylvain's technique:

Etape 1 : (ancien module) : module_1 est installé en version 12.0.1 avec toutes les datas et tout ce qui va bien.
Etape 2 : (refactoring)
module_1 dépend de module_2.
module_1 est vide (plus de data, plus de python, plus rien.) Tout est dans module 2.
dans le module_2, en pre-init, appelez des scripts qui rename les xml_ids de module_1.* en module_2.*.

Etape 3 (switch) :
Faire un update all qui va installer le module 2 par dépendance.

Etape 4 : (état final)
désinstaller module_1, qui est une coquille vide.

Translations

cd src/oca/$REPO

click-odoo-makepot --addons-dir . --msgmerge-if-new-pot --commit -d blank --log-level=debug

Git history when proposing modules to the OCA

  • The split can be done in one branch in the initial repo

  • In case some modules are proposed to the OCA : rebuild the git history with https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-14.0

    • The filter -- $MODULE allow to keep only the changes related to a specific module and is useful to create one branch per module
    • Is there a way to do this without having to move the branch to the OCA repo using https://gitlab.com/coopiteasy/doc/-/blob/master/documentation/move-a-module.md ?
    • E.g. I have a branch 12.0-split-modules in the OCA repo that contains all the split.:
      • git checkout 12.0
      • git format-patch --keep-subject --stdout 12.0..12.0-split-modules -- $MODULE
  • Keep the git history up to the split in the initial repo, then remove the splitted modules (because they are moved to the OCA repo (keep the remaining original module because it contains the dependencies)

@robinkeunen robinkeunen pinned this issue Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant