Skip to content
Snippets Groups Projects
Commit b5ddfc983abf authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

Support Odoo 10 executables ("odoo-bin")

parent 8f0517d4940f
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
- create_documentation: Fix paths of per-module documentation. - create_documentation: Fix paths of per-module documentation.
- Support Odoo 10 ("odoo-bin" instead of "openerp-server").
2.10 2.10
---- ----
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
It need to be run on a machine with all the odoo requirements installed, either system-wide or in a virtual environment (which need to be activated). It need to be run on a machine with all the odoo requirements installed, either system-wide or in a virtual environment (which need to be activated).
Its arguments are passed to openerp-server. Its arguments are forwarded to the Odoo executable (``odoo-bin`` / ``openerp-server``).
do_tests do_tests
-------- --------
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
python=python python=python
# module_path will be .../<directory>/openerp/__init__.pyc # module_path will be .../<directory>/openerp/__init__.pyc
module_path=$(python -B -c "import os;import openerp;print os.path.abspath(openerp.__file__)") module_path=$(python -B -c "import os;import openerp;print os.path.abspath(openerp.__file__)")
# By default, assume the Odoo executable is called "openerp-server".
# TODO Improve this detection and make it so Odoo 10 ("odoo-bin") is the default.
odoo_bin=openerp-server
if test -z "$module_path"; if test -z "$module_path";
then then
virtualenv_name=$(basename $(readlink -f $(dirname start))) virtualenv_name=$(basename $(readlink -f $(dirname start)))
...@@ -24,15 +27,24 @@ ...@@ -24,15 +27,24 @@
fi fi
if test -z "$module_path"; if test -z "$module_path";
then then
echo "No odoo found, trying /opt/odoo/sources/odoo/openerp-server" echo "No odoo found, trying /opt/odoo/sources/odoo/odoo-bin"
if test -e "/opt/odoo/sources/odoo/openerp-server"; if test -e "/opt/odoo/sources/odoo/odoo-bin";
then then
python=/usr/bin/python python=/usr/bin/python
module_path="/opt/odoo/sources/odoo/openerp/__init__.py" module_path="/opt/odoo/sources/odoo/odoo/__init__.py"
else odoo_bin=odoo-bin
echo "No odoo found, did you activate your env?" else
exit 1 echo "No odoo-bin found, trying /opt/odoo/sources/odoo/openerp-server"
fi if test -e "/opt/odoo/sources/odoo/openerp-server";
then
python=/usr/bin/python
module_path="/opt/odoo/sources/odoo/openerp/__init__.py"
odoo_bin=openerp-server
else
echo "No odoo found, did you activate your env?"
exit 1
fi
fi
fi fi
fi fi
...@@ -100,5 +112,5 @@ ...@@ -100,5 +112,5 @@
fi fi
fi fi
fi fi
echo "DEBUG - command line is: $python $odoo/openerp-server $config $db_host $data_dir $addons_path $args" echo "DEBUG - command line is: $python $odoo/$odoo_bin $config $db_host $data_dir $addons_path $args"
$python $odoo/openerp-server $config $db_host $data_dir $addons_path $args $python $odoo/$odoo_bin $config $db_host $data_dir $addons_path $args
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