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

:sparkles: add odoo13

parent 980767f588f7
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,11 @@
History
=======
3.1
---
Add odoo 13
3.0
---
......
......@@ -20,7 +20,7 @@
It expect the configuration file (`setup.cfg`_) to have the following keys:
- ``odoo_type``: type of odoo (odoo7, odoo8, odoo10 or odoo11) [default to odoo8]. The environment variable ODOO_TYPE can be used instead.
- ``odoo_type``: type of odoo (odoo7, odoo8, odoo10, odoo11 or odoo13) [default to odoo8]. The environment variable ODOO_TYPE can be used instead.
- ``modules``: list of directories and files to include (also used by another script)
......@@ -177,7 +177,7 @@
modules
list of modules to install (relative to project directory), those modules are the ones copied in the Dockerfile
odoo_type
type of odoo (odoo7, odoo8, odoo10, odoo11)
type of odoo (odoo7, odoo8, odoo10, odoo11, odoo13)
pg.extensions
postgresql extensions to install (unaccent is added automatically depending on odoo configuration)
load-language
......
......@@ -171,7 +171,7 @@
'RUN apt-get update -qq\n')
myfile.write(
'RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ')
if odoo_type == 'odoo11':
if odoo_type in ('odoo11', 'odoo13'):
myfile.write(
'python3-watchdog python3-ipdb python3-pyinotify\n')
elif odoo_type in ('odoo10', ):
......
......@@ -538,7 +538,8 @@
if os.path.isfile(local_conf_path):
_logger.info('Local configuration file found: %s', local_conf_path)
odoo_conf_file = (
'/etc/odoo/odoo.conf' if odoo_type in ('odoo11', 'odoo12', )
'/etc/odoo/odoo.conf'
if odoo_type in ('odoo11', 'odoo12', 'odoo13')
else '/opt/odoo/etc/odoo.conf'
)
binds.append('{}:{}'.format(os.path.join(
......@@ -755,7 +756,7 @@
isort(docker_client)
if dev:
if odoo_type in ('odoo11', 'odoo10'):
if odoo_type in ('odoo10', 'odoo11', 'odoo13'):
# ipdb should not be run if not interactive
arg.append('--dev=reload,ipdb')
if odoo_type in ('odoo8',):
......
......@@ -41,7 +41,7 @@
loglevel="--log-level=test"
fi
logfile=$(tempfile --suffix=.log)
if [ "$ODOO_TYPE" = "odoo11" ];
if [ "$ODOO_TYPE" = "odoo11" ] || [ "$ODOO_TYPE" = "odoo13" ];
then
export PRE_ODOO_BIN="python3-coverage run --source=$project_home "
fi
......
......@@ -15,7 +15,7 @@
else
python="python2"
fi
# odoo7, odoo8, odoo10, odoo11
# odoo7, odoo8, odoo10, odoo11, odoo13
ODOO_TYPE=${ODOO_TYPE:-$($python -B -c "from six.moves import configparser ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(c.get('odoo_scripts', 'odoo_type') if c.has_option('odoo_scripts', 'odoo_type') else 'odoo8')")}
echo "INFO - Starting odoo ($ODOO_TYPE) for development"
......@@ -30,7 +30,7 @@
odoo_command=openerp-server
odoo_addons_path=${ODOO_ADDONS_PATH:-/opt/odoo/sources/odoo}
;;
odoo10 | odoo11)
odoo10 | odoo11 | odoo13)
odoo_command=odoo
;;
esac
......@@ -42,5 +42,5 @@
else
echo "DEBUG - No odoo command found"
echo "DEBUG - Trying import in python"
if [ "$ODOO_TYPE" = "odoo11" ] || [ "$ODOO_TYPE" = "odoo10" ];
if [ "$ODOO_TYPE" = "odoo7" ] || [ "$ODOO_TYPE" = "odoo8" ];
then
......@@ -46,2 +46,4 @@
then
print_statement="import os;import openerp;print os.path.abspath(openerp.__file__)"
else
print_statement="import os;import odoo;print os.path.abspath(odoo.__file__)"
......@@ -47,6 +49,4 @@
print_statement="import os;import odoo;print os.path.abspath(odoo.__file__)"
else
print_statement="import os;import openerp;print os.path.abspath(openerp.__file__)"
fi
# module_path will be .../<directory>/openerp/__init__.pyc
module_path=$(python -B -c "$print_statement" 2> /dev/null)
......
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