Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] Support for Odoo 13.0 and Ubuntu 18.04 LTS #110

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ env:
- 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"
- IMAGE="ubuntu:xenial" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5"
# Ubuntu 18.04 (bionic)
# Odoo 13.0
- IMAGE="ubuntu:bionic" ODOO_VERSION=13.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="ubuntu:bionic" ODOO_VERSION=13.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="ubuntu:bionic" ODOO_VERSION=13.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5"

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

## Supported versions and systems

| 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 |
| System / Odoo | 8.0 | 9.0 | 10.0 | 11.0 | 13.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 | - |
| Ubuntu 16.04 | yes | yes | yes | yes | - |
| Ubuntu 18.04 | - | - | - | - | yes |

## Example (Playbook)

Expand All @@ -45,7 +47,7 @@ the same host):
become: yes
roles:
- role: odoo
odoo_version: 11.0
odoo_version: 13.0
odoo_config_admin_passwd: SuPerPassWorD
```

Expand All @@ -61,7 +63,7 @@ available from your Ansible inventory):
become: yes
roles:
- role: odoo
odoo_version: 11.0
odoo_version: 13.0
odoo_config_admin_passwd: SuPerPassWorD
odoo_config_db_host: pg_server
odoo_config_db_user: odoo
Expand All @@ -87,7 +89,7 @@ Here we set some options required by the ``connector`` framework:
become: yes
roles:
- role: odoo
odoo_version: 11.0
odoo_version: 13.0
odoo_repo_type: git
odoo_repo_url: https://SERVER/REPO
odoo_repo_rev: master
Expand Down Expand Up @@ -118,8 +120,8 @@ if Odoo version 11 is to be used:
roles:
- role: odoo
odoo_install_type: pip
odoo_version: 11.0
odoo_pip_requirements_url: https://raw.githubusercontent.com/OCA/sample-oca-pip-requirements/11.0/requirements.txt
odoo_version: 13.0
odoo_pip_requirements_url: https://raw.githubusercontent.com/OCA/sample-oca-pip-requirements/13.0/requirements.txt
odoo_config_admin_passwd: SuPerPassWorD
environment:
LC_ALL: en_US.UTF-8
Expand All @@ -139,7 +141,7 @@ by Buildout:
roles:
- role: odoo
odoo_install_type: buildout
odoo_version: 11.0
odoo_version: 13.0
odoo_repo_type: git
odoo_repo_url: https://github.com/osiell/odoo-buildout-example.git
odoo_repo_rev: "{{ odoo_version }}"
Expand All @@ -156,7 +158,7 @@ your Ansible inventory):
roles:
- role: odoo
odoo_install_type: buildout
odoo_version: 11.0
odoo_version: 13.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 @@ -191,7 +193,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: 11.0
odoo_version: 13.0
odoo_repo_type: git
odoo_repo_url: https://SERVER/REPO
odoo_repo_rev: master
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ansible_ssh_pipelining: true

odoo_install_type: standard # standard, buildout
odoo_pip_executable: "pip"
odoo_version: 11.0
odoo_service: odoo
odoo_user: odoo
Expand Down Expand Up @@ -59,6 +60,7 @@ odoo_config_db_template: template1
odoo_config_db_user: "{{ odoo_user }}"
odoo_config_dbfilter: '.*'
odoo_config_debug_mode: False # <= 9.0
odoo_config_pg_path: None # >= 13.0
odoo_config_pidfile: None
odoo_config_proxy_mode: False
odoo_config_email_from: False
Expand Down
4 changes: 3 additions & 1 deletion tasks/install_standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
- odoo_packages

- name: Install Odoo dependencies (PyPi)
pip: name={{ item }}
pip:
name: "{{ item }}"
executable: "{{ odoo_pip_executable }}"
with_items: "{{ odoo_pypi_packages }}"
tags:
- odoo_packages
Expand Down
64 changes: 64 additions & 0 deletions templates/odoo-13.0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[options]
{% if odoo_install_type == 'pip' %}
addons_path =
{% else %}
addons_path = {{ odoo_config_addons_path.__class__.__name__ == 'list' and odoo_config_addons_path | join(',') or odoo_config_addons_path }}
{% endif %}
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 = {{ odoo_config_pg_path }}
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 %}
1 change: 1 addition & 0 deletions templates/odoo-13.0.init
1 change: 1 addition & 0 deletions vars/Ubuntu-16_Odoo-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ odoo_debian_packages:
- python3-xlsxwriter
- python3-yaml

odoo_pip_executable: "pip3"
odoo_pypi_packages:
- psycogreen
- qrcode
Expand Down
125 changes: 125 additions & 0 deletions vars/Ubuntu-18_Odoo-13.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---

odoo_debian_packages:
- build-essential
- python3-dev
- python3-pip
# Python pyldap requirements
- libldap2-dev
- libsasl2-dev
# Python lxml requirements
- libxml2
- libxml2-dev
- libxslt1-dev

odoo_pip_executable: "pip3"
odoo_pypi_packages:
# Straight from the Odoo requirements.txt
- Babel==2.3.4
- chardet==3.0.4
- decorator==4.0.10
- docutils==0.12
- ebaysdk==2.1.5
- feedparser==5.2.1
- gevent==1.1.2 ; python_version < '3.7'
- gevent==1.3.4 ; python_version >= '3.7'
- greenlet==0.4.10 ; python_version < '3.7'
- greenlet==0.4.13 ; python_version >= '3.7'
- html2text==2016.9.19
- Jinja2==2.10.1
- libsass==0.12.3
- lxml==3.7.1 ; python_version < '3.7'
- lxml==4.2.3 ; python_version >= '3.7'
- Mako==1.0.4
- MarkupSafe==0.23
- mock==2.0.0
- num2words==0.5.6
- ofxparse==0.16
- passlib==1.6.5
- Pillow==5.4.0
- polib==1.1.0
- psutil==4.3.1
- psycopg2==2.7.3.1
- pydot==1.2.3
- pyldap==2.4.28
- pyparsing==2.1.10
- PyPDF2==1.26.0
- pyserial==3.1.1
- python-dateutil==2.5.3
- pytz==2016.7
- pyusb==1.0.0
- qrcode==5.3
- reportlab==3.3.0
- requests==2.20.0
- zeep==3.1.0
- vatnumber==1.2
- vobject==0.9.3
- Werkzeug==0.14.1
- XlsxWriter==0.9.3
- xlwt==1.3.*
- xlrd==1.0.0

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_pip_dependencies:
- wrapt
- setuptools-odoo
- odoo-autodiscover

odoo_pip_build_dependencies:
- python3-virtualenv
- build-essential
- python3-dev
- libxml2-dev
- libxslt1-dev
- libpq-dev
- libldap2-dev
- libsasl2-dev
- libopenjp2-7-dev
- libjpeg-turbo8-dev
- libtiff5-dev
- libfreetype6-dev
- liblcms2-dev
- libwebp-dev
- libssl-dev

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

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

odoo_wkhtmltox_version: 0.12.5
odoo_wkhtmltox_urls:
- https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/{{ odoo_wkhtmltox_version }}/wkhtmltox_{{ odoo_wkhtmltox_version }}-1.{{ ansible_distribution_release }}_{{ odoo_debian_arch }}.deb

odoo_wkhtmltox_depends:
- fontconfig
- libfontconfig1
- libfreetype6
- zlib1g
- libx11-6
- libxext6
- libxrender1
- libjpeg-turbo8