Wiki Mint SystemWiki Mint System
Home
Glossary
Mint System
Chat
GitHub
Home
Glossary
Mint System
Chat
GitHub
  • Prozesse Odoo - Modul Migration

Prozesse Odoo - Modul Migration

Submodule-Branch initialisieren

Arbeitsschritte:

  • Navigation in das Submodule
cd addons/$REPO
  • Neuer Branch erstellen
git switch --orphan $TARGET_VERSION
  • Alle Dateien entfernen
rm -rf ./*
  • Template-Dateien kopieren und README.md Datei aktualisieren
task template-repo addons/$REPO
  • Änderungen committen
git add --all
git commit -m "feat: init $TARGET_VERSION"
git push --set-upstream origin $TARGET_VERSION
  • Submodule auf Odoo Build hinzufügen
task add-git-submodule git@github.com:Mint-System/Odoo-Apps-$REPO.git addons/$REPO
  • Änderungen auf Odoo Build committen
  • Register repo to https://apps.odoo.com/apps/dashboard/repos

Modul migrieren

Arbeitsschritte:

  • In Odoo-Build die neue Odoo Version auschecken:
task load-version $TARGET_VERSION
  • Auschecken Modul von vorhergehender Version
cd addons/$REPO
git checkout $SOURCE_VERSION $MODULE`
  • Modul-Code und Version in __manifest__.py aktualisieren
task upgrade-module addons/$REPO/$MODULE $SOURCE_VERSION
  • Generate module doc file.
task generate-module-docs addons/$REPO/$MODULE
  • Modul linten und Repo aktualisieren:
cd addons/$REPO/
task all
  • Modul installieren und testen
task init-module addons/$REPO/$MODULE
  • If required migrate the attrs definition with this prompt.
PROMPT=$(cat << EOF
Migrate this view from Odoo 16.0 to 17.0. For example:
<field name="test_field_1" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="test_field_2" attrs="{'invisible': [('zip', '!=', 123)]}"/>
<field name="test_field_3" attrs="{'readonly': [('zip', '!=', False)]}"/>
To:
<field name="test_field_1" invisible="active"/>
<field name="test_field_2" invisible="zip != 123"/>
<field name="test_field_3" readonly="zip"/>
EOF
)

task update-with-llm addons/$REPO/$MODULE/views/*.xml "$PROMPT"
  • Test-Instruktionen erstellen (siehe Odoo Module Test Instructions)
  • Migration committen
git -C addons/$REPO add --all
git -C addons/$REPO commit -m "feat($MODULE): migrate
  • Optional einen Pull-Request erstellen:
    • Feature branch erstellen git switch -c mig-$MODULE
    • Und mit dem CLI einen PR erstellen gh pr create
    • Wenn PR gemerged ist, das Submodule-Repo deployen
  • Änderungen pushen
git push

Mint System Fork für OCA Repository erstellen

Arbeitsschritte:

  • Go to the repo and create a fork
  • Navigate into the local repo`cd oca/sale-workflow
  • Add the fork as remote git remote add mint-system git@github.com:Mint-System/sale-workflow.git
  • Checkout a customer branch git switc -c $BRANCH-$PROJECT_CODE
  • Push a branch to the remote with git push mint-system $BRANCH-$PROJECT_CODE

OCA-Modul migrieren

Arbeitsschritte:

  • Prüfen ob für das gesuchte Modul ein Pull-Request existiert, der alle Tests erfüllt
  • Prüfen ob eine Anleitung für die Odoo-Version existiert: Odoo Build - Migrate an OCA module
  • Modul-Migration gemäss Anleitung ausführen

Backlinks:

🔗 Odoo Upgrade
🔗 Prozesse Odoo
🔗 Prozesse Odoo.sh - Modul Migration

📝 Edit on GitHub

This page is maintained by Mint System GmbH