diff --git a/addons/account_invoicing b/addons/account_invoicing index c972bf09..2245a0f7 160000 --- a/addons/account_invoicing +++ b/addons/account_invoicing @@ -1 +1 @@ -Subproject commit c972bf096b6eec0ddb96835696ad3bc2968f8efb +Subproject commit 2245a0f7f0275d2b9f556ddb165f8f7b040dcbeb diff --git a/addons/sale_workflow b/addons/sale_workflow index 3fb8bf73..54affc65 160000 --- a/addons/sale_workflow +++ b/addons/sale_workflow @@ -1 +1 @@ -Subproject commit 3fb8bf739a1454115f7b6de43ad926e27201431f +Subproject commit 54affc65047837c4fdde865861f1e2e22c1b1937 diff --git a/addons/server_tools b/addons/server_tools index 3a759f8e..74bffd50 160000 --- a/addons/server_tools +++ b/addons/server_tools @@ -1 +1 @@ -Subproject commit 3a759f8e735dbc4dcb13b2b41d47beda046634d7 +Subproject commit 74bffd502893659053c9688c6c7086e66649fcfe diff --git a/addons/vertical_saas b/addons/vertical_saas index e9731bc3..9f440cff 160000 --- a/addons/vertical_saas +++ b/addons/vertical_saas @@ -1 +1 @@ -Subproject commit e9731bc30dbb4fe1dbe74d496245c427bd1e7595 +Subproject commit 9f440cff8ed459a64815038753b7f8495cbef8a9 diff --git a/task b/task index 70ee9a66..0c825302 100755 --- a/task +++ b/task @@ -23,7 +23,6 @@ function help-table() { printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "convert-database" "[db]" "Convert database backup file from PostgreSQL 9.5 to latest. Default is branch name." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "create-module" "[path]" "Create new Odoo module from template." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "create-revision" "[revision]" "Create new Odoo revision." - printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "deploy" "[name]" "Deploy to Kubernetes cluster. Options: db, admin, odoo, mail." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "disable-auto-install" "" "Disable auto install for enterprise modules." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "disable-mailserver" "[env]" "Disable mail server settings via xmlrpc." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "docker-login" "" "Setup Docker Hub login credentials." @@ -34,7 +33,7 @@ function help-table() { printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "generate-help-doc" "" "Write help table to task.md file." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "generate-module-security" "[path][model]" "Generate model access file for a selected model of a module." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "generate-module-model" "[path][model]" "Generate model files from module template." - printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "get-addons-path" "" "Finds modules in addons folder." + printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "get-addons-path" "" "Find nested modules and return addons path." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "get-module-version" "[path]" "Get module version from manifest." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "git-feature-branch" "[path]" "Create feature branch for Odoo module." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "git-mig-branch" "[path]" "Create migration branch for Odoo module." @@ -48,7 +47,7 @@ function help-table() { printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "import-csv" "[db][path]" "Import data from csv. Filename must match PostgreSQL table name." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "info" "" "Show values of project env vars." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "init-db" "[db]" "Initialize the Odoo database. Default is branch name." - printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "init-minikube" "" "Deploy the Odoo K8s manifets." + printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "init-minikube" "" "Deploy the Odoo K8s manifests." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "init-nextcloud-env" "[env]" "Create env file for Nextcloud instance." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "init-odoo-env" "[env]" "Create env file for Odoo Instance." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "init-venv" "" "Initialize python virtual env." @@ -60,8 +59,7 @@ function help-table() { printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "install-snippet" "[env][path]" "Install snippet xml definition." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "lint-module" "[path]" "Run pylint odoo for module." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "lint-snippets" "" "Run checks for all snippets." - printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "list" "" "List Docker containers." - printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "list-addons" "" "List Odoo addons." + printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "list-modules" "" "List Odoo modules." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "list-env" "" "List env files." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "list-revision" "" "List available Odoo revisions." printf "| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n" "logs" "" "Tail Odoo Docker container logs." @@ -173,6 +171,8 @@ function version() { psql -V docker -v docker-compose -v + minikube version + kubectl version } function set-addons-path() { @@ -214,6 +214,15 @@ function get-addons-path() { echo "$ADDONS_PATH" } +function list-env() { + ls -f "$ODOO_DEVELOPMENT_CONFIG_DIR" +} + +function list-modules() { + set-addons-path + echo "$ADDONS_PATH" | tr "," "\n" | xargs -I {} find {} -type f -name "__manifest__.py" | xargs grep -l "version.*${GIT_BRANCH}" | xargs -r dirname | xargs -r -I {} basename {} | sort -u +} + function update-readme() { if test -z "$1"; then echo "\$1 is empty."; exit; fi README_PATH="$1" @@ -652,12 +661,6 @@ function translate-module() { odoo -d "$DATABASE" --config "config/odoo.conf" --addons-path="$ADDONS_PATH" --modules "$MODULE_NAME" -l "$LANGUAGE" --i18n-export "$MODULE_PATH/i18n/$LANGUAGE.po" } -function list-addons() { - activate-venv - set-addons-path - echo "$ADDONS_PATH" -} - function import-csv() { if test -z "$1"; then echo "\$1 is empty."; exit; fi @@ -1560,9 +1563,6 @@ case "$1" in create-revision) create-revision "$2" ;; - deploy) - deploy "$2" - ;; disable-auto-install) disable-auto-install ;; @@ -1684,14 +1684,11 @@ case "$1" in lint-snippets) lint-snippets ;; - list-addons) - list-addons - ;; list-env) - ls -f "$ODOO_DEVELOPMENT_CONFIG_DIR" + list-env ;; - list) - docker-compose config --services; echo "native" + list-modules) + list-modules ;; logs) docker logs odoo -f