#!/bin/bash cd "$(dirname "$0")" function help() { echo echo "$1 [options]" echo echo "commands:" echo column -t -s"|" ./task.md | tail -n +3 echo } # Set env vars PATH="$PATH:./odoo" GIT_TAG=0 GIT_BRANCH=$(git symbolic-ref --short -q HEAD) export POSTGRES_USER=odoo export POSTGRES_PASSWORD=odoo export ODOO_REVISION=$GIT_BRANCH export ODOO_LANGUAGE=de_CH export ODOO_DEVELOPMENT_CONFIG_DIR="$HOME/.config/odoo-development" if [[ -a ".env" ]]; then export $(cat .env | sed 's/#.*//g' | xargs) fi function get-module-version() { if test -z "$1" then echo "\$1 is empty" else # get version of module VERSION=$(grep 'version' "$1/__manifest__.py" | sed "s;';\";g" | sed "s/,//g" ) VERSION=$(echo "{ $VERSION }" | jq .version | sed 's/"//g' | sed 's/null//g') # set default version [ -z "$VERSION" ] && VERSION=0.0 # check if oca version or enterprise version if echo "$VERSION" | grep -qe "^[0-9]\." then VERSION="$GIT_BRANCH.$VERSION.$GIT_TAG" fi echo $VERSION fi } function init-venv() { if [ ! -d "venv$GIT_BRANCH" ]; then python3 -m venv "venv$GIT_BRANCH" fi } function activate-venv() { echo "Source virtualenv venv$GIT_BRANCH." source "venv$GIT_BRANCH/bin/activate" } function locale() { export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 } function load-env() { export $(cat "$ODOO_DEVELOPMENT_CONFIG_DIR/.env.$1" | sed 's/#.*//g' | xargs) } function disable-auto-install() { echo "Disable auto install for all enterprise modules." find ./enterprise -type f -name '__manifest__.py' -exec sed -i'' $'s/\'auto_install\': True,/\'auto_install\': False,/g' {} + } function install-odoo-scripts() { curl -L https://raw.githubusercontent.com/mint-system/ansible-playbooks/master/roles/odoo-scripts/files/install | sh } function install-native() { echo "Install wkhtmltopdf" sudo apt install wkhtmltopdf echo "Install xmllint" sudo apt install libxml2-utils init-venv activate-venv echo "Install pylint odoo" pip install --upgrade --pre pylint-odoo echo "Install odoo dependencies" pip install setuptools wheel watchdog phonenumbers pip install -r odoo/requirements.txt echo "Install oca dev tools" pip install pre-commit pyyaml rst2html5 echo "Install graphql dependencies" pip install graphene graphql-server-core echo "Install rest dependencies" pip install cerberus pyquerystring parse-accept-language apispec>=4.0.0 marshmallow marshmallow-objects>=2.0.0 jsondiff echo "Install openupgrade functions" pip install git+https://github.com/OCA/openupgradelib.git@master#egg=openupgradelib echo "Install addon dependencies" pip install prometheus_client echo "Install edi dependencies" pip install pyzbar numpy pdf2image opencv-python } function open-url-with-delay(){ if test -z "$1"; then echo "\$1 is empty"; exit; fi sleep 2 xdg-open $1 } function start() { if test -z "$1"; then echo "Open http://localhost:8069 url in your browser." docker-compose up -d fi if [[ "$1" =~ "db" ]]; then docker-compose up -d db pgadmin echo "Open http://localhost:8000 url in your browser." fi if [[ "$1" =~ "mail" ]]; then docker-compose up -d mail echo "Open http://localhost url in your browser." fi if [[ "$1" =~ "native" ]]; then locale activate-venv echo "Open http://localhost:8069 url in your browser." open-url-with-delay 'http://localhost:8069' & odoo-bin --config 'config/odoo-native.conf' --dev=all fi } function restart() { if test -z "$1"; then docker-compose restart fi if [[ "db|mail|odoo" =~ "$1" ]]; then docker-compose restart $1 fi } function stop() { if test -z "$1"; then docker-compose stop fi docker-compose stop $1 } function start-shell() { DATABASE=$1 DATABASE=${DATABASE:="odoo"} locale activate-venv odoo-bin shell -d $DATABASE --config 'config/odoo-native.conf' --no-http } function start-psql() { DATABASE=$1 DATABASE=${DATABASE:="odoo"} docker exec -it db psql postgres://odoo:odoo@localhost:5432/$DATABASE } function init-db() { DATABASE=$1 DATABASE=${DATABASE:="odoo"} locale activate-venv echo "Make sure only one odoo process is running when initalizing the database." # odoo-bin --init base -d $DATABASE --db_host=localhost --db_password=odoo --db_user=odoo --no-http odoo-bin --init base -d $DATABASE --config 'config/odoo-native.conf' --stop-after-init --no-http --load-language $ODOO_LANGUAGE } function odoo-cloc() { DATABASE=$1 DATABASE=${DATABASE:="odoo"} locale activate-venv odoo-bin cloc -d $DATABASE --config 'config/odoo-native.conf' --stop-after-init --no-http } function lint-module() { if test -z "$1"; then echo "\$1 is empty"; exit; fi activate-venv echo "Run pylint in $1" pylint --load-plugins=pylint_odoo -d all -e odoolint $1 cd $1 echo "Run pre-commit in $1" pre-commit run --files ./* echo "Update index.html" rst2html5 README.rst static/description/index.html echo "Stage changes" git add . } function update-module() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$2 is empty"; exit; fi MODULE_NAME=$(basename $2) locale activate-venv echo "Updating module $MODULE_NAME on $1 ..." odoo-bin -d $1 -u $MODULE_NAME --config 'config/odoo-native.conf' --stop-after-init --no-http } function generate-module-translation() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$2 is empty"; exit; fi MODULE_NAME=$(basename $2) locale activate-venv echo "Generate tranlsation file for $MODULE_NAME on $1 ..." mkdir "$2/i18n/" odoo-bin -d $1 --config 'config/odoo-native.conf' --modules $MODULE_NAME -l $ODOO_LANGUAGE --i18n-export "$2/i18n/de.po" } function restore-database() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$2 is empty"; exit; fi # Get database name # Extract zip file. # Drop database # Import databse # Copy filestore } function install-module() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$2 is empty"; exit; fi MODULE_NAME=$(basename $2) locale activate-venv echo "Installing module $MODULE_NAME on $1 ..." odoo-bin -d $1 -i $MODULE_NAME --config 'config/odoo-native.conf' --stop-after-init --no-http } function test-module() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$2 is empty"; exit; fi MODULE_NAME=$(basename $2) locale activate-venv odoo-bin -d $1 -i $MODULE_NAME --config 'config/odoo-native.conf' --stop-after-init --log-level=test --test-enable } function remove-module() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$2 is empty"; exit; fi MODULE_NAME=$(basename $2) locale activate-venv echo "Remove module $MODULE_NAME" echo "self.env['ir.module.module'].search([('name', '=', '$MODULE_NAME')]).button_immediate_uninstall()" | odoo-bin shell -d $1 --config 'config/odoo-native.conf' --no-http } function create-module() { if test -z "$1"; then echo "\$1 is empty"; exit; fi MODULE_NAME=$(basename "$1") PARENT_DIR=$(dirname "$1") locale activate-venv echo "Scaffolding module $MODULE_NAME in $PARENT_DIR ..." odoo-bin scaffold "$MODULE_NAME" "$PARENT_DIR" -t template/ms_custom_module } function drop-db() { DATABASE=$1 DATABASE=${DATABASE:="odoo"} docker exec db psql postgres://odoo:odoo@localhost:5432/postgres -c "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = '$DATABASE';" docker exec db psql postgres://odoo:odoo@localhost:5432/postgres -c "DROP DATABASE \"$DATABASE\";" } function set-admin() { DATABASE=$1 DATABASE=${DATABASE:="odoo"} docker exec db psql postgres://odoo:odoo@localhost:5432/$DATABASE -c "UPDATE res_users SET active=true,password='\$pbkdf2-sha512\$25000\$JuScEwIg5JzTGqNUivFeqw\$yWTOcix2Afr3XGP2NPY7w4w49e9vpsu14NRndDYXAkbtMF4zkrmx6inVsoLl0zZY30xI/0GzhwonWsK9TUmjWA' WHERE id=2;" docker exec db psql postgres://odoo:odoo@localhost:5432/$DATABASE -c "SELECT login, password FROM res_users WHERE id=2;" } function send-support-mail() { echo "Send mail to support@localhost using curl." cat >tmp/email.txt < To: Odoo Support Subject: Support Request echo "\$2 is Dear Odoo Support, I request your help EOL curl smtp://localhost --mail-from admin@yourcompany.example.com --mail-rcpt support@localhost --upload-file tmp/email.txt } function clear-assets() { DATABASE=$1 DATABASE=${DATABASE:="odoo"} echo "Delete these assets:" docker exec db psql postgres://odoo:odoo@localhost/$DATABASE -c "select id,name from ir_attachment where res_model='ir.ui.view' and name like '%assets_%';" docker exec db psql postgres://odoo:odoo@localhost/$DATABASE -c "delete from ir_attachment where res_model='ir.ui.view' and name like '%assets_%';" echo "Restart your docker service." } function convert-database() { if test -z "$1"; then echo "\$1 is empty"; exit; fi unzip "tmp/$1.zip" -d "./tmp/$1" sed -i'' 's/AS integer//g' "./tmp/$1/dump.sql" grep -i 'as integer' "./tmp/$1/dump.sql" cd "tmp/$1" ; zip -r "../${1}2.zip" . ; cd ../.. rm -r "tmp/$1" echo "Converted database file $1 to ${1}2" } function checkout() { if test -z "$1"; then echo "\$1 is empty"; exit; fi : ${GIT_BRANCH:="$2"} echo "Switch branch" git switch $1 echo "Init submodules" git submodule update --init echo "Checkout branch on submodules" # git submodule foreach git checkout $1 SUBMODULES=$(git config --file .gitmodules --get-regexp url | sed -e 's/submodule.//g' -e 's/.url.*//g') for SUBMODULE in $SUBMODULES; do CWD=$(pwd) cd $SUBMODULE git stash git switch $1 cd $CWD done echo "Sync checkout files" git checkout $GIT_BRANCH config/checkout_files config/remove_files git rm -r $(tr '\n' ' ' < ./config/remove_files) git checkout $GIT_BRANCH $(tr '\n' ' ' < ./config/checkout_files) } function git-pull-submodules() { # Pull submodule if update config is not set SUBMODULES=$(git config --file .gitmodules --get-regexp url | sed -e 's/submodule.//g' -e 's/.url.*//g') for SUBMODULE in $SUBMODULES; do UPDATE=$(git config submodule.$SUBMODULE.update) CWD=$(pwd) cd $SUBMODULE if [ -z $UPDATE ]; then git pull fi; cd $CWD done # git submodule foreach ' # update=$(git config -f $toplevel/.gitmodules submodule.$name.update) # if [ -z $update ]; then # git pull # fi; # ' | tee git-pull-submodules.log } function release-module() { if test -z "$1"; then echo "\$1 is empty"; exit; fi VERSION=$(get-module-version $1) cd $1 echo "Tag with v$VERSION ..." git tag -a v$VERSION -m "v$VERSION" echo "Create release $VERSION ..." gh release create "v$VERSION" -t "Release $VERSION" } function zip-module() { if test -z "$1"; then echo "\$1 is empty"; exit; fi # Get version and module name VERSION=$(get-module-version $1) MODULE=$(basename "$1") # Copy module to tmp folder echo "Copy module $MODULE version $VERSION to tmp folder" MODULE_NAME="$MODULE-$VERSION" MODULE_PATH="tmp/$MODULE_NAME" rm -rf "$MODULE_PATH" mkdir -p "$MODULE_PATH" cp -r "$1/." "$MODULE_PATH" chmod -R 755 "$MODULE_PATH" # Configure and zip module echo "Remove auto install option" sed -i'' -e "s/'auto_install': True,/'auto_install': False,/" "$MODULE_PATH/__manifest__.py" echo "Remove pycache and hidden folders" find $MODULE_PATH | grep -E "(\.git|__pycache__|\.pyc|\.pyo$)" | xargs rm -rf echo "Zip module $MODULE" cd tmp rm -f $MODULE_NAME.zip zip -q -r $MODULE_NAME.zip $MODULE_NAME cd .. } function clear-filestore() { echo "Remove directory ~/.local/share/Odoo/filestore/$1" rm -rf ~/.local/share/Odoo/filestore/$1 } function disable-mailserver() { if test -z "$1"; then echo "\$1 is empty"; exit; fi activate-venv load-env $1 scripts/odooctl --model 'ir.mail_server' --field 'active' --value False scripts/odooctl --model 'fetchmail.server' --field 'active' --value False } function change-uuid() { if test -z "$1"; then echo "\$1 is empty"; exit; fi activate-venv load-env $1 UUID=$(uuidgen) echo "Set uuid $UUID for $1." scripts/odooctl --model 'ir.config_parameter' --domain "['key', '=', 'database.uuid']" --field 'value' --value "'$UUID'" } function update-snippet() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$2 is empty"; exit; fi # Generate view name from filename FILE=$(basename $2) NAME="mint_system.${FILE%.xml}" activate-venv load-env $1 echo "Update view with name $NAME" scripts/odooctl --model 'ir.ui.view' --domain "['name', '=', '$NAME']" --field 'arch_base' --value "'''$(cat $2)'''" } function install-snippet() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$2 is empty"; exit; fi # Generate view name from filename FILE=$(basename $2) NAME="mint_system.${FILE%.xml}" INHERIT_ID=$(echo 'cat //data/@inherit_id' | xmllint --shell $2 | awk -F'[="]' '!/>/{print $(NF-1)}') TYPE=$(echo 'cat //data/@type' | xmllint --shell $2 | awk -F'[="]' '!/>/{print $(NF-1)}') MODEL=$(echo 'cat //data/@model' | xmllint --shell $2 | awk -F'[="]' '!/>/{print $(NF-1)}') PRIORITY=$(echo 'cat //data/@priority' | xmllint --shell $2 | awk -F'[="]' '!/>/{print $(NF-1)}') MODULE_NAME=$(echo $INHERIT_ID | cut -d. -f 1 ) XML_ID=$(echo $INHERIT_ID | cut -d. -f 2 ) # Set default values : ${TYPE:='qweb'} activate-venv load-env $1 echo "Search for view with name $MODULE_NAME.$XML_ID" INHERIT_ID=$(scripts/odooctl --method 'get_id' --model 'ir.model.data' --value "['$MODULE_NAME','$XML_ID']") echo "Found view id $INHERIT_ID" echo "Apply view $NAME" scripts/odooctl --method 'create' --model 'ir.ui.view' --value "{ 'name': '$NAME', 'type': '$TYPE', 'model': '$MODEL', 'mode': 'extension', 'priority': $PRIORITY, 'inherit_id': $INHERIT_ID, 'arch_base': '''$(cat $2)''' }" } function lint-snippets() { FILES="snippets/*.xml" for FILE in $FILES; do # Access various snippet parameters FILENAME=$(basename $FILE) SNIPPET_MODULE=$(echo $FILENAME | cut -d. -f1) REPORT=$(echo $FILENAME | cut -d. -f2) EDIT=$(echo $FILENAME | cut -d. -f3) INHERIT_ID=$(echo 'cat //data/@inherit_id' | xmllint --shell $FILE | awk -F'[="]' '!/>/{print $(NF-1)}') TYPE=$(echo 'cat //data/@type' | xmllint --shell $FILE | awk -F'[="]' '!/>/{print $(NF-1)}') MODEL=$(echo 'cat //data/@model' | xmllint --shell $FILE | awk -F'[="]' '!/>/{print $(NF-1)}') PRIORITY=$(echo 'cat //data/@priority' | xmllint --shell $FILE | awk -F'[="]' '!/>/{print $(NF-1)}') MODULE_NAME=$(echo $INHERIT_ID | cut -d. -f 1 ) XML_ID=$(echo $INHERIT_ID | cut -d. -f 2 ) # Check filename COUNT_DOTS=$(echo $FILENAME | grep -o "\." | wc -l) if [ $COUNT_DOTS -ge 4 ]; then echo "Linting failed for $FILE" echo "Dots count: $COUNT_DOTS" echo " Filename: $SNIPPET_MODULE.$REPORT" exit 1 fi # Check if inherit id matches the filename if [ -n "$INHERIT_ID" ]; then if [[ "$INHERIT_ID" != "$SNIPPET_MODULE.$REPORT" ]]; then echo "Linting failed for $FILE" echo " Inherit: $INHERIT_ID" echo "Filename: $SNIPPET_MODULE.$REPORT" exit 1 fi fi # Check if priority is set if [ -z "$PRIORITY" ] && [ -n "$INHERIT_ID" ]; then echo "Linting failed for $FILE" echo "No priority is set." exit 1 fi done echo "No problems with snippets found." } function update-app-list() { if test -z "$1"; then echo "\$1 is empty"; exit; fi locale activate-venv echo "env['ir.module.module'].update_list()" | odoo-bin shell -d $1 --config 'config/odoo-native.conf' --no-http } function init-config-dir() { echo "Ensure $ODOO_DEVELOPMENT_CONFIG_DIR exists" mkdir -p "$ODOO_DEVELOPMENT_CONFIG_DIR" } function init-odoo-env() { if test -z "$1"; then echo "\$1 is empty"; exit; fi init-config-dir ENV_FILEPATH="$ODOO_DEVELOPMENT_CONFIG_DIR/.env.$1" echo "Init env file: $ENV_FILEPATH" echo "#ODOO_URL=" > $ENV_FILEPATH echo "ODOO_DATABASE=" >> $ENV_FILEPATH echo "ODOO_USERNAME=" >> $ENV_FILEPATH echo "ODOO_PASSWORD=" >> $ENV_FILEPATH } function init-next-env() { if test -z "$1"; then echo "\$1 is empty"; exit; fi init-config-dir ENV_FILEPATH="$ODOO_DEVELOPMENT_CONFIG_DIR/.env.$1" echo "Init env file: $ENV_FILEPATH" echo "NEXTCLOUD_URL=" > $ENV_FILEPATH echo "NEXTCLOUD_USERNAME=" >> $ENV_FILEPATH echo "NEXTCLOUD_PASSWORD=" >> $ENV_FILEPATH } function edit-env() { if test -z "$1"; then echo "\$1 is empty"; exit; fi ENV_FILEPATH="$ODOO_DEVELOPMENT_CONFIG_DIR/.env.$1" $EDITOR $ENV_FILEPATH } function upload-module() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$1 is empty"; exit; fi zip-module $2 # Get path to zip file and upload url FILE_PATH="tmp/$MODULE_NAME.zip" load-env $1 NEXTCLOUD_UPLOAD_URL="$NEXTCLOUD_URL/remote.php/dav/files/$NEXTCLOUD_USERNAME/Odoo-Apps/" # Upload zip file curl -u "$NEXTCLOUD_USERNAME:$NEXTCLOUD_PASSWORD" -T "$FILE_PATH" "$NEXTCLOUD_UPLOAD_URL" echo "File $FILE_PATH uploaded to $NEXTCLOUD_UPLOAD_URL." } function save-config() { if test -z "$1"; then echo "\$1 is empty"; exit; fi locale activate-venv odoo-bin -s -d $1 --config 'config/odoo-native.conf' --stop-after-init --no-http } function remove-submodule() { if test -z "$1"; then echo "\$1 is empty"; exit; fi echo "Move submodule to tmp folder" mkdir -p tmp/$1 mv $1 tmp/$1 echo "Deinit submodule" git submodule deinit -f $1 echo "Remove submodule from .git folder" rm -rf .git/modules/$1 echo "Remove submodule from work tree" git rm -f $1 echo "Remove $1 submodule from .gitmodules files manually." } function update-config() { # Read addons path list ADDONS="$(tr '\n' ',' < ./config/addons_path)" # Check if dir exists for ADDON in $ADDONS; do if [ -d "$ADDON" ]; then echo "Path does not exist: $ADDON" exit 1 fi done # Update native config sed -i'' -e "s|addons_path.*|addons_path = odoo/addons,$ADDONS|g" "./config/odoo-native.conf" ADDONS="$(echo "$ADDONS" | sed 's|,|,/mnt/|g')" # Update docker config sed -i'' -e "s|addons_path.*|addons_path = /mnt/$ADDONS|g" "./config/odoo.conf" echo "Config updated." } function git-list-submodules() { git config --file .gitmodules --get-regexp url | sed -e 's/submodule.//g' -e 's/.url//g' | awk '{ print $1 "," $2}' } function git-feature-branch(){ if test -z "$1"; then echo "\$1 is empty"; exit; fi MODULE_NAME=$(basename $1) MODULE_PATH=$(dirname $1) echo "Create feature branch for $MODULE_NAME in $MODULE_PATH ..." cd ./$MODULE_PATH pwd git switch -c "feature-$MODULE_NAME" } function git-mig-branch(){ if test -z "$1"; then echo "\$1 is empty"; exit; fi MODULE_NAME=$(basename $1) MODULE_PATH=$(dirname $1) echo "Create mig branch for $MODULE_NAME in $MODULE_PATH ..." cd ./$MODULE_PATH pwd git switch -c "$GIT_BRANCH-mig-$MODULE_NAME" } function patch-database() { if test -z "$1"; then echo "\$1 is empty"; exit; fi if test -z "$2"; then echo "\$1 is empty"; exit; fi # Generate view name from filename FILENAME=$(basename $2) echo "Apply patch $FILENAME to Database $1." cat $2 | docker exec -i db psql postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost/$1 echo "Patching database succeeded" } function update-docs() { lint-snippets echo "Update snippets.md file." echo "# Snippets" > snippets.md PATH_URL="https://github.com/Mint-System/Odoo-Development/tree/14.0" FILES="snippets/*.xml" # Group by modules MODULES=$(ls $FILES | xargs -n 1 basename | cut -d. -f1 | uniq) for MODULE in $MODULES; do TITLE="${MODULE^}" # Uppercase first letter TITLE=$(echo $TITLE | sed 's/_/ /g') # Replace underline with space TITLE=$(echo $TITLE | sed -r 's/\<./\U&/g') # Uppercase first letter after space echo "## $TITLE" >> snippets.md for FILE in $FILES; do FILENAME=$(basename $FILE) SNIPPET_MODULE=$(echo $FILENAME | cut -d. -f1) XML_ID=$(echo $FILENAME | cut -d. -f2) EDIT=$(echo $FILENAME | cut -d. -f3) EDIT_TITLE=$(echo $EDIT | sed 's/_/ /g') # Replace underline with space EDIT_TITLE=$(echo $EDIT_TITLE | sed -r 's/\<./\U&/g') # Uppercase first letter after space XML_ID_TITLE=$(echo $XML_ID | sed 's/_/ /g') # Replace underline with space XML_ID_TITLE=$(echo $XML_ID_TITLE | sed -r 's/\<./\U&/g') # Uppercase first letter after space # Group by modules if [[ "$MODULE" = "$SNIPPET_MODULE" ]]; then echo "### $XML_ID_TITLE: $EDIT_TITLE " >> snippets.md echo "ID: \`mint_system.$SNIPPET_MODULE.$XML_ID.$EDIT\` " >> snippets.md echo "Link: [$FILE]($PATH_URL/$FILE)" >> snippets.md echo "" >> snippets.md fi done done } case "$1" in disable-auto-install) disable-auto-install ;; save-config) save-config $2 ;; checkout) checkout $2 $3 ;; list) docker-compose config --services; echo "native" ;; ps) docker ps --format 'table {{.Names}}\t{{.Image}}\t{{(.Label "description")}}\t{{.Status}}' ;; start) start $2 ;; restart) restart $2 ;; stop) stop $2 ;; kill) docker-compose down -v ;; logs) docker logs odoo -f ;; init-venv) init-venv ;; install-odoo-scripts) install-odoo-scripts ;; install-native) install-native ;; init-db) init-db $2 ;; start-shell) start-shell $2 ;; start-psql) start-psql $2 ;; update-module) update-module $2 $3 ;; test-module) test-module $2 $3 ;; create-module) create-module $2 ;; drop-db) drop-db $2 ;; send-support-mail) send-support-mail ;; clear-assets) clear-assets $2 ;; odoo-cloc) odoo-cloc $2 ;; restore-database) restore-database $2 $3 ;; convert-database) convert-database $2 ;; install-module) install-module $2 $3 ;; remove-module) remove-module $2 $3 ;; remove-submodule) remove-submodule $2 ;; release-module) release-module $2 ;; lint-module) lint-module $2 ;; zip-module) zip-module $2 ;; clear-filestore) clear-filestore $2 ;; init-odoo-env) init-odoo-env $2 ;; list-odoo-env) ls -f "$ODOO_DEVELOPMENT_CONFIG_DIR" ;; edit-env) edit-env $2 ;; disable-mailserver) disable-mailserver $2 ;; change-uuid) change-uuid $2 ;; set-admin) set-admin $2 ;; update-config) update-config ;; git-list-submodules) git-list-submodules ;; git-feature-branch) git-feature-branch $2 ;; git-mig-branch) git-mig-branch $2 ;; update-snippet) update-snippet $2 $3 ;; install-snippet) install-snippet $2 $3 ;; lint-snippets) lint-snippets ;; update-app-list) update-app-list $2 ;; init-next-env) init-next-env $2 ;; upload-module) upload-module $2 $3 ;; generate-module-translation) generate-module-translation $2 $3 ;; patch-database) patch-database $2 $3 ;; git-pull-submodules) git-pull-submodules ;; update-docs) update-docs ;; source) activate-venv ;; *) help task exit 1 ;; esac