# HG changeset patch # User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr> # Date 1591366404 -7200 # Fri Jun 05 16:13:24 2020 +0200 # Node ID 197b9eb71ab9ed21f603a4ace4c7ac884fb956b4 # Parent 980767f588f7cd0d23b3194ef493762e2fe37fe6 ✨ add odoo13 diff --git a/NEWS.rst b/NEWS.rst --- a/NEWS.rst +++ b/NEWS.rst @@ -2,6 +2,11 @@ History ======= +3.1 +--- + +Add odoo 13 + 3.0 --- diff --git a/README.rst b/README.rst --- a/README.rst +++ b/README.rst @@ -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 diff --git a/odoo_scripts/docker_build.py b/odoo_scripts/docker_build.py --- a/odoo_scripts/docker_build.py +++ b/odoo_scripts/docker_build.py @@ -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', ): diff --git a/odoo_scripts/docker_dev_start.py b/odoo_scripts/docker_dev_start.py --- a/odoo_scripts/docker_dev_start.py +++ b/odoo_scripts/docker_dev_start.py @@ -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',): diff --git a/run_tests b/run_tests --- a/run_tests +++ b/run_tests @@ -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 diff --git a/start b/start --- a/start +++ b/start @@ -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,11 +42,11 @@ 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 + 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__)" - 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)