From e602fb6693ce9917e8fd463fabc711a7fbede36b Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Thu, 28 Oct 2021 08:56:20 +0200 Subject: [PATCH] update task, tempalte and ref --- addons/partner_contact | 2 +- enterprise | 2 +- oca/partner-contact | 2 +- odoo | 2 +- task | 20 ++++++++++++++++--- task.md | 1 + template/ms_custom_module/__manifest__.py | 2 +- .../{ir_sequence_data.xml => ir_sequence.xml} | 0 8 files changed, 23 insertions(+), 8 deletions(-) rename template/ms_custom_module/data/{ir_sequence_data.xml => ir_sequence.xml} (100%) diff --git a/addons/partner_contact b/addons/partner_contact index ba2567bc..c4dad4ce 160000 --- a/addons/partner_contact +++ b/addons/partner_contact @@ -1 +1 @@ -Subproject commit ba2567bc4ed50eb308fea2215b276580439f6e14 +Subproject commit c4dad4ce2c0f6c7a318cb34cddd590161491c27b diff --git a/enterprise b/enterprise index 3eb703e7..91b18aca 160000 --- a/enterprise +++ b/enterprise @@ -1 +1 @@ -Subproject commit 3eb703e73f6d7cf84ec847a5a8d019b1e5ddaf23 +Subproject commit 91b18acaaddb080e199da1b482d531fa47742793 diff --git a/oca/partner-contact b/oca/partner-contact index 7bd208d2..c9f231bb 160000 --- a/oca/partner-contact +++ b/oca/partner-contact @@ -1 +1 @@ -Subproject commit 7bd208d2d00b8e7189c62b4b4b2ce6c83a5fe7a2 +Subproject commit c9f231bbcc3c168f4cc9354f108aeee246f8da1d diff --git a/odoo b/odoo index 2dbe39ae..0ef9583b 160000 --- a/odoo +++ b/odoo @@ -1 +1 @@ -Subproject commit 2dbe39aed5361341cdc87607e671ef19234e0196 +Subproject commit 0ef9583b27cdce82b484f302a77b8c5a96aa73f8 diff --git a/task b/task index 069d859c..b1aebebb 100755 --- a/task +++ b/task @@ -154,8 +154,8 @@ function init-db() { locale activate-venv - # odoo-bin --init base -d $DATABASE --db_host=localhost --db_password=odoo --db_user=odoo - odoo-bin --init base -d $DATABASE --config 'config/odoo-native.conf' --stop-after-init --no-http + odoo-bin --init base -d $DATABASE --db_host=localhost --db_password=odoo --db_user=odoo + # odoo-bin --init base -d $DATABASE --config 'config/odoo-native.conf' --stop-after-init --no-http } function odoo-cloc() { @@ -197,7 +197,18 @@ function install-module() { locale activate-venv - odoo-bin -d $1 -i $MODULE_NAME --config 'config/odoo-native.conf' --stop-after-init --no-http + 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() { @@ -560,6 +571,9 @@ case "$1" in update-module) update-module $2 $3 ;; + test-module) + test-module $2 $3 + ;; create-module) create-module $2 ;; diff --git a/task.md b/task.md index fb2b7dc4..beaab9f8 100644 --- a/task.md +++ b/task.md @@ -30,6 +30,7 @@ | start-psql | [db] | Start PSQL shell in Docker container. | | start-shell | [db] | Start Odoo shell from source folder. | | stop | | Stop docker containers. | +| test-module | [db] [name,path] | Test target Odoo module. | | update-config | | Update odoo config. | | update-app-list | [db] | Update app list. | | update-module | [db] [name,path] | Update target Odoo module. | diff --git a/template/ms_custom_module/__manifest__.py b/template/ms_custom_module/__manifest__.py index 9527897f..80dee183 100644 --- a/template/ms_custom_module/__manifest__.py +++ b/template/ms_custom_module/__manifest__.py @@ -16,7 +16,7 @@ 'data': [ # 'security/ir.model.access.csv', # 'views/report_invoice_document.xml', - # 'data/ir_sequence_data.xml', + # 'data/ir_sequence.xml', # 'views/assets.xml', 'views/views.xml', ], diff --git a/template/ms_custom_module/data/ir_sequence_data.xml b/template/ms_custom_module/data/ir_sequence.xml similarity index 100% rename from template/ms_custom_module/data/ir_sequence_data.xml rename to template/ms_custom_module/data/ir_sequence.xml