Skip to content

Commit

Permalink
[IMP] Add support for Odoo 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sebalix committed Nov 9, 2017
1 parent dab2023 commit e1c505c
Show file tree
Hide file tree
Showing 8 changed files with 325 additions and 18 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ env:
# Odoo 10.0
- IMAGE="images:debian/stretch" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="images:debian/stretch" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5"
# Odoo 11.0
- IMAGE="images:debian/stretch" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="images:debian/stretch" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5"
# Ubuntu 14.04 (trusty)
# Odoo 8.0
- IMAGE="ubuntu:trusty" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5"
Expand All @@ -43,6 +46,9 @@ env:
# Odoo 10.0
- IMAGE="ubuntu:xenial" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="ubuntu:xenial" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5"
# Odoo 11.0
- IMAGE="ubuntu:xenial" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="ubuntu:xenial" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5"

install:
# Spawn a LXD container
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Minimum Ansible Version: 2.4

## Supported versions and systems

| System / Odoo | 8.0 | 9.0 | 10.0 |
|---------------|-----|-----|------|
| Debian 8 | yes | yes | yes |
| Debian 9 | yes | yes | yes |
| Ubuntu 14.04 | yes | yes | yes |
| Ubuntu 16.04 | yes | yes | yes |
| System / Odoo | 8.0 | 9.0 | 10.0 | 11.0 |
|---------------|-----|-----|------|------|
| Debian 8 | yes | yes | yes | - |
| Debian 9 | yes | yes | yes | yes |
| Ubuntu 14.04 | yes | yes | yes | - |
| Ubuntu 16.04 | yes | yes | yes | yes |

## Example (Playbook)

Expand All @@ -41,7 +41,7 @@ the same host):
become: yes
roles:
- role: odoo
odoo_version: 10.0
odoo_version: 11.0
odoo_config_admin_passwd: SuPerPassWorD
```
Expand All @@ -57,7 +57,7 @@ available from your Ansible inventory):
become: yes
roles:
- role: odoo
odoo_version: 10.0
odoo_version: 11.0
odoo_config_admin_passwd: SuPerPassWorD
odoo_config_db_host: pg_server
odoo_config_db_user: odoo
Expand All @@ -83,7 +83,7 @@ Here we set some options required by the ``connector`` framework:
become: yes
roles:
- role: odoo
odoo_version: 10.0
odoo_version: 11.0
odoo_repo_type: git
odoo_repo_url: https://SERVER/REPO
odoo_repo_rev: master
Expand Down Expand Up @@ -113,7 +113,7 @@ by Buildout:
roles:
- role: odoo
odoo_install_type: buildout
odoo_version: 10.0
odoo_version: 11.0
odoo_repo_type: git
odoo_repo_url: https://github.com/osiell/odoo-buildout-example.git
odoo_repo_rev: "{{ odoo_version }}"
Expand All @@ -130,7 +130,7 @@ your Ansible inventory):
roles:
- role: odoo
odoo_install_type: buildout
odoo_version: 10.0
odoo_version: 11.0
odoo_repo_type: git
odoo_repo_url: https://github.com/osiell/odoo-buildout-example.git
odoo_repo_rev: "{{ odoo_version }}"
Expand Down Expand Up @@ -165,7 +165,7 @@ We just set the relevant options to tell Ansible the files to use with the
roles:
- role: odoo
odoo_install_type: buildout
odoo_version: 10.0
odoo_version: 11.0
odoo_repo_type: git
odoo_repo_url: https://SERVER/REPO
odoo_repo_rev: master
Expand Down
16 changes: 10 additions & 6 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ odoo_config_db_maxconn: 64
odoo_config_db_name: False
odoo_config_db_passwd: False
odoo_config_db_port: False
odoo_config_db_sslmode: prefer # >= 11.0
odoo_config_db_template: template1
odoo_config_db_user: "{{ odoo_user }}"
odoo_config_dbfilter: '.*'
Expand All @@ -59,6 +60,9 @@ odoo_config_pidfile: None
odoo_config_proxy_mode: False
odoo_config_email_from: False
odoo_config_geoip_database: /usr/share/GeoIP/GeoLiteCity.dat
odoo_config_http_enable: True # >= 11.0
odoo_config_http_interface: '' # >= 11.0
odoo_config_http_port: 8069 # >= 11.0
odoo_config_limit_memory_hard: 805306368
odoo_config_limit_memory_soft: 671088640
odoo_config_limit_time_cpu: 60
Expand Down Expand Up @@ -87,12 +91,12 @@ odoo_config_translate_modules: "['all']"
odoo_config_unaccent: False
odoo_config_without_demo: False
odoo_config_workers: 0
odoo_config_xmlrpc: True
odoo_config_xmlrpc_interface: ''
odoo_config_xmlrpc_port: 8069
odoo_config_xmlrpcs: True
odoo_config_xmlrpcs_interface: ''
odoo_config_xmlrpcs_port: 8071
odoo_config_xmlrpc: True # <= 10.0
odoo_config_xmlrpc_interface: '' # <= 10.0
odoo_config_xmlrpc_port: 8069 # <= 10.0
odoo_config_xmlrpcs: True # <= 8.0
odoo_config_xmlrpcs_interface: '' # <= 8.0
odoo_config_xmlrpcs_port: 8071 # <= 8.0
# Custom configuration options
odoo_config_custom: {}
#your_option1: value1
Expand Down
61 changes: 61 additions & 0 deletions templates/odoo-11.0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[options]
addons_path = {{ odoo_config_addons_path.__class__.__name__ == 'list' and odoo_config_addons_path | join(',') or odoo_config_addons_path }}
admin_passwd = {{ odoo_config_admin_passwd }}
csv_internal_sep = {{ odoo_config_csv_internal_sep }}
data_dir = {{ odoo_config_data_dir }}
db_host = {{ odoo_config_db_host not in [False, 'localhost', '127.0.0.1'] and odoo_config_db_host in hostvars and hostvars[odoo_config_db_host].get('ansible_host') or odoo_config_db_host }}
db_maxconn = {{ odoo_config_db_maxconn }}
db_name = {{ odoo_config_db_name }}
db_password = {{ odoo_config_db_passwd }}
db_port = {{ odoo_config_db_port }}
db_sslmode = {{ odoo_config_db_sslmode }}
db_template = {{ odoo_config_db_template }}
db_user = {{ odoo_config_db_user }}
dbfilter = {{ odoo_config_dbfilter }}
demo = {}
email_from = {{ odoo_config_email_from }}
geoip_database = {{ odoo_config_geoip_database }}
http_enable = {{ odoo_config_http_enable or odoo_config_xmlrpc }}
http_interface = {{ odoo_config_http_interface or odoo_config_xmlrpc_interface }}
http_port = {{ odoo_config_http_port or odoo_config_xmlrpc_port }}
import_partial =
limit_memory_hard = {{ odoo_config_limit_memory_hard }}
limit_memory_soft = {{ odoo_config_limit_memory_soft }}
limit_request = 8192
limit_time_cpu = {{ odoo_config_limit_time_cpu }}
limit_time_real = {{ odoo_config_limit_time_real }}
limit_time_real_cron = {{ odoo_config_limit_time_real_cron }}
list_db = {{ odoo_config_list_db }}
log_db = {{ odoo_config_log_db }}
log_db_level = warning
log_handler = :INFO
log_level = {{ odoo_config_log_level }}
logfile = {{ odoo_config_logfile }}
logrotate = {{ odoo_config_logrotate }}
longpolling_port = {{ odoo_config_longpolling_port }}
max_cron_threads = {{ odoo_config_max_cron_threads }}
osv_memory_age_limit = {{ odoo_config_osv_memory_age_limit }}
osv_memory_count_limit = {{ odoo_config_osv_memory_count_limit }}
pg_path = None
pidfile = {{ odoo_config_pidfile }}
proxy_mode = {{ odoo_config_proxy_mode }}
reportgz = False
server_wide_modules = {{ odoo_config_server_wide_modules }}
smtp_password = {{ odoo_config_smtp_password }}
smtp_port = {{ odoo_config_smtp_port }}
smtp_server = {{ odoo_config_smtp_server }}
smtp_ssl = {{ odoo_config_smtp_ssl }}
smtp_user = {{ odoo_config_smtp_user }}
syslog = {{ odoo_config_syslog }}
test_commit = False
test_enable = False
test_file = False
test_report_directory = False
translate_modules = {{ odoo_config_translate_modules }}
unaccent = {{ odoo_config_unaccent }}
without_demo = {{ odoo_config_without_demo }}
workers = {{ odoo_config_workers }}
{% for name in odoo_config_custom | sort %}
{{ name }} = {{ odoo_config_custom[name] }}
{% endfor %}

58 changes: 58 additions & 0 deletions templates/odoo-11.0.conf.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[options]
addons_path = /home/odoo/odoo/parts/odoo/odoo/addons,/home/odoo/odoo/parts/odoo/addons
admin_passwd = admin
csv_internal_sep = ,
data_dir = /home/odoo/.local/share/Odoo
db_host = False
db_maxconn = 64
db_name = False
db_password = False
db_port = False
db_sslmode = prefer
db_template = template1
db_user = False
dbfilter = .*
demo = {}
email_from = False
geoip_database = /usr/share/GeoIP/GeoLiteCity.dat
http_enable = True
http_interface =
http_port = 8069
import_partial =
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
limit_time_real_cron = -1
list_db = True
log_db = False
log_db_level = warning
log_handler = :INFO
log_level = info
logfile = None
logrotate = False
longpolling_port = 8072
max_cron_threads = 2
osv_memory_age_limit = 1.0
osv_memory_count_limit = False
pg_path = None
pidfile = None
proxy_mode = False
reportgz = False
server_wide_modules = web
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
syslog = False
test_commit = False
test_enable = False
test_file = False
test_report_directory = False
translate_modules = ['all']
unaccent = False
without_demo = False
workers = 0

1 change: 1 addition & 0 deletions templates/odoo-11.0.init
82 changes: 82 additions & 0 deletions vars/Debian-9_Odoo-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---

odoo_debian_packages:
- python3-dev
- python3-openssl
- python3-markupsafe
# Dependencies taken from the deb package
- python3-babel
- python3-dateutil
- python3-decorator
- python3-docutils
- python3-feedparser
- python3-gevent
- python3-html2text
- python3-jinja2
- python3-lxml
- python3-mako
- python3-mock
- python3-ofxparse
- python3-openid
- python3-passlib
- python3-pil
- python3-psutil
- python3-psycopg2
- python3-pydot
- python3-pyldap
- python3-pyparsing
- python3-pypdf2
- python3-qrcode
- python3-reportlab
- python3-requests
- python3-serial
- python3-suds
- python3-tz
- python3-usb
- python3-vatnumber
- python3-vobject
- python3-werkzeug
- python3-xlsxwriter
- python3-yaml

odoo_nodejs_apt_package: "nodejs=6.*"
odoo_nodejs_apt_repo: "node_6.x"
odoo_npm_packages:
- name: less
version: 2.7.2
- name: less-plugin-clean-css
version: 1.5.1
- name: phantomjs-prebuilt
version: 2.1.15

odoo_buildout_build_dependencies:
- python3-virtualenv
- build-essential
- python3-dev
- libxml2-dev
- libxslt1-dev
- libpq-dev
- libldap2-dev
- libsasl2-dev
- libopenjp2-7-dev
- libjpeg62-turbo-dev
- libtiff5-dev
- libfreetype6-dev
- liblcms2-dev
- libwebp-dev

odoo_buildout_venv_cmd: "virtualenv --no-setuptools --python=python3 {{ odoo_buildout_venv_path }}"

odoo_wkhtmltox_depends:
- fontconfig
- libfontconfig1
- libfreetype6
- libpng12-0
- zlib1g
- libssl1.0.0
- libx11-6
- libxext6
- libxrender1
- libstdc++6
- libc6
- libjpeg62-turbo
Loading

0 comments on commit e1c505c

Please sign in to comment.