Wiki Mint SystemWiki Mint System
Home
Glossary
Mint System
Chat
GitHub
Home
Glossary
Mint System
Chat
GitHub
  • Migrate OCA module to 17.0

    • Prepare
    • Migrate
    • Submit

Migrate OCA module to 17.0

See Migration to version 17.0 for details.

Prepare

Set env vars.

export ODOO_CURRENT_VERSION=16.0
export ODOO_TARGET_VERSION=17.0
export REPO=purchase-workflow
export MODULE=purchase_order_owner
export USER_ORG=Mint-System

Fork the original repo to the user/org by opening the url:

echo "https://github.com/OCA/$REPO/fork"

Make sure to fork all branches.

Prepare repo for migration.

cd ~/Odoo-Build
task checkout "$ODOO_TARGET_VERSION"

Das OCA-Repo als Submodule hinzufügen.

task add-git-submodule "git@github.com:OCA/$REPO.git" "oca/$REPO"

Activate venv and navigate into the repo.

source task source
cd "oca/$REPO"

Migrate

Create the migration branch.

git checkout -b "$ODOO_TARGET_VERSION-mig-$MODULE" "origin/$ODOO_TARGET_VERSION"
git format-patch --keep-subject --stdout origin/$ODOO_TARGET_VERSION..origin/$ODOO_CURRENT_VERSION -- $MODULE | git am -3 --keep

Run pre commit checks.

pre-commit run -a

Resolve the pre-commit issues.

Commit the pre commit checks.

git add -A
git commit -m "[IMP] $MODULE: pre-commit stuff"  --no-verify

Start the Odoo environment and install the module.

task init-module "oca/$REPO/$MODULE"

Follow Tasks to do in the migration to update the module.

Submit

Finalize the migration.

git add --all
git commit -m "[MIG] $MODULE: Migration to $ODOO_TARGET_VERSION"

Set remote and push.

git remote add "$USER_ORG" "git@github.com:$USER_ORG/$REPO.git"
git push "$USER_ORG" "$ODOO_TARGET_VERSION-mig-$MODULE" --set-upstream

Follow the link on the command line and submit the pull request.

echo -e "Title:\n[$ODOO_TARGET_VERSION][MIG] $MODULE: Migration to $ODOO_TARGET_VERSION"
echo -e "Description:\nStandard migration from $ODOO_CURRENT_VERSION to $ODOO_TARGET_VERSION."

Once submitted check the runboat checks.

Backlinks:

🔗 Odoo Build - Migrate an OCA module

📝 Edit on GitHub

This page is maintained by Mint System GmbH