Skip to content
Snippets Groups Projects
Commit ac2e6ae9 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:loud_sound: more debug logs

parent 8141710e
No related branches found
No related tags found
1 merge request!39🔊 more debug logs
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
source $here/common source $here/common
# odoo7, odoo8, odoo10, odoo11, odoo13 # odoo7, odoo8, odoo10, odoo11, odoo13
echo "$DEBUG Reading odoo_type from odoo_scripts configuration"
ODOO_TYPE=${ODOO_TYPE:-$(read_odoo_scripts_configuration_key odoo_type odoo8)} ODOO_TYPE=${ODOO_TYPE:-$(read_odoo_scripts_configuration_key odoo_type odoo8)}
echo "$INFO Starting odoo ($ODOO_TYPE) for development" echo "$INFO Starting odoo ($ODOO_TYPE) for development"
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
if [ -x "$(command -v $odoo_command)" ]; if [ -x "$(command -v $odoo_command)" ];
then then
odoo_bin=$odoo_command odoo_bin=$odoo_command
echo "$DEBUG Command found" echo "$DEBUG Odoo command found ($odoo_bin)"
else else
echo "$DEBUG No odoo command found" echo "$DEBUG No odoo command found"
echo "$DEBUG Trying import in python" echo "$DEBUG Trying import in python"
...@@ -94,9 +95,10 @@ ...@@ -94,9 +95,10 @@
# #
args=$* args=$*
echo "$DEBUG Try to find if any db host is specified"
if echo "$args" | grep -q -e '\( \|^\)--db_host'; if echo "$args" | grep -q -e '\( \|^\)--db_host';
then then
db_host="" db_host=""
else else
db_host="--db_host=localhost" db_host="--db_host=localhost"
fi fi
...@@ -97,8 +99,9 @@ ...@@ -97,8 +99,9 @@
if echo "$args" | grep -q -e '\( \|^\)--db_host'; if echo "$args" | grep -q -e '\( \|^\)--db_host';
then then
db_host="" db_host=""
else else
db_host="--db_host=localhost" db_host="--db_host=localhost"
fi fi
echo "$DEBUG Try to find if any odoo configuration is specified"
if echo "$args" | grep -q -e '\( \|^\)-c' -e '\( \|^\)--config'; if echo "$args" | grep -q -e '\( \|^\)-c' -e '\( \|^\)--config';
then then
...@@ -103,7 +106,8 @@ ...@@ -103,7 +106,8 @@
if echo "$args" | grep -q -e '\( \|^\)-c' -e '\( \|^\)--config'; if echo "$args" | grep -q -e '\( \|^\)-c' -e '\( \|^\)--config';
then then
echo "$DEBUG Configuration is specified, no extra argument added"
config="" config=""
addons_path="" addons_path=""
else else
if [ -e "${project_home}/conf/drone/odoo.conf" ]; if [ -e "${project_home}/conf/drone/odoo.conf" ];
then then
...@@ -105,8 +109,9 @@ ...@@ -105,8 +109,9 @@
config="" config=""
addons_path="" addons_path=""
else else
if [ -e "${project_home}/conf/drone/odoo.conf" ]; if [ -e "${project_home}/conf/drone/odoo.conf" ];
then then
echo "$DEBUG Use ${project_home}/conf/drone/odoo.conf as configuration file"
config="--config=${project_home}/conf/drone/odoo.conf" config="--config=${project_home}/conf/drone/odoo.conf"
elif [ -e "${project_home}/conf/dev/odoo.conf" ]; elif [ -e "${project_home}/conf/dev/odoo.conf" ];
then then
...@@ -110,5 +115,6 @@ ...@@ -110,5 +115,6 @@
config="--config=${project_home}/conf/drone/odoo.conf" config="--config=${project_home}/conf/drone/odoo.conf"
elif [ -e "${project_home}/conf/dev/odoo.conf" ]; elif [ -e "${project_home}/conf/dev/odoo.conf" ];
then then
echo "$DEBUG Use ${project_home}/conf/dev/odoo.conf as configuration file"
config="--config=${project_home}/conf/dev/odoo.conf" config="--config=${project_home}/conf/dev/odoo.conf"
fi fi
...@@ -113,4 +119,5 @@ ...@@ -113,4 +119,5 @@
config="--config=${project_home}/conf/dev/odoo.conf" config="--config=${project_home}/conf/dev/odoo.conf"
fi fi
echo "$DEBUG Try to find if any addons path is provided"
if echo "$args" | grep -q -e '\( \|^\)--addons-path'; if echo "$args" | grep -q -e '\( \|^\)--addons-path';
then then
...@@ -115,5 +122,6 @@ ...@@ -115,5 +122,6 @@
if echo "$args" | grep -q -e '\( \|^\)--addons-path'; if echo "$args" | grep -q -e '\( \|^\)--addons-path';
then then
echo "$DEBUG addons-path is specified, no extra argument added"
addons_path="" addons_path=""
else else
if [ -n "${ODOO_ADDONS_PATH+set}" ]; if [ -n "${ODOO_ADDONS_PATH+set}" ];
...@@ -123,6 +131,7 @@ ...@@ -123,6 +131,7 @@
pathes=$ODOO_ADDONS_PATH pathes=$ODOO_ADDONS_PATH
fi fi
else else
echo "$DEBUG Reading modules from setup.cfg"
modules_to_use=$(read_odoo_scripts_expandable_configuration_key modules) modules_to_use=$(read_odoo_scripts_expandable_configuration_key modules)
if [ "$ODOO_TYPE" = "odoo7" ] || [ "$ODOO_TYPE" = "odoo8" ]; if [ "$ODOO_TYPE" = "odoo7" ] || [ "$ODOO_TYPE" = "odoo8" ];
then then
...@@ -133,6 +142,7 @@ ...@@ -133,6 +142,7 @@
fi fi
if [ -n "$pathes" ]; if [ -n "$pathes" ];
then then
echo "$DEBUG --addons-path=$pathes"
addons_path="--addons-path=$pathes" addons_path="--addons-path=$pathes"
fi fi
fi fi
...@@ -142,8 +152,9 @@ ...@@ -142,8 +152,9 @@
then then
echo "$INFO load-language flag detected, no reading from setup.cfg" echo "$INFO load-language flag detected, no reading from setup.cfg"
else else
echo "$DEBUG Reading load-language from configuration"
load_language=$(read_odoo_scripts_configuration_key load-language) load_language=$(read_odoo_scripts_configuration_key load-language)
if [ -n "$load_language" ]; if [ -n "$load_language" ];
then then
load_language="--load-language=$load_language" load_language="--load-language=$load_language"
fi fi
...@@ -145,8 +156,9 @@ ...@@ -145,8 +156,9 @@
load_language=$(read_odoo_scripts_configuration_key load-language) load_language=$(read_odoo_scripts_configuration_key load-language)
if [ -n "$load_language" ]; if [ -n "$load_language" ];
then then
load_language="--load-language=$load_language" load_language="--load-language=$load_language"
fi fi
echo "$DEBUG load-language=$load_language"
fi fi
# #
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment