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 12.0 and Ubuntu 18.04 LTS #104

Open
wants to merge 5 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
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ 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 11.0
- IMAGE="ubuntu:bionic" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="ubuntu:bionic" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="ubuntu:bionic" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5"
# Odoo 12.0
- IMAGE="ubuntu:bionic" ODOO_VERSION=12.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="ubuntu:bionic" ODOO_VERSION=12.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5"
- IMAGE="ubuntu:bionic" ODOO_VERSION=12.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5"
install:
# Spawn a LXD container
- sudo ./tests/travis_lxd/install.sh
Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ 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 | 12.0 |
|---------------|-----|-----|------|------|------|
| Debian 8 | yes | yes | yes | - | - |
| Debian 9 | yes | yes | yes | yes | - |
| Ubuntu 14.04 | yes | yes | yes | - | - |
| Ubuntu 16.04 | yes | yes | yes | - | - |
| Ubuntu 18.04 | - | - | - | yes | yes |

## Example (Playbook)

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

Expand All @@ -61,7 +62,7 @@ available from your Ansible inventory):
become: yes
roles:
- role: odoo
odoo_version: 11.0
odoo_version: 12.0
odoo_config_admin_passwd: SuPerPassWorD
odoo_config_db_host: pg_server
odoo_config_db_user: odoo
Expand All @@ -87,7 +88,7 @@ Here we set some options required by the ``connector`` framework:
become: yes
roles:
- role: odoo
odoo_version: 11.0
odoo_version: 12.0
odoo_repo_type: git
odoo_repo_url: https://SERVER/REPO
odoo_repo_rev: master
Expand All @@ -109,7 +110,7 @@ Here we set some options required by the ``connector`` framework:

Pip installation (assuming that PostgreSQL is installed and running on
the same host). We need to ensure that the environment variable LC_ALL is used
if Odoo version 11 is to be used:
if Odoo version 12 is to be used:

```yaml
- name: Odoo
Expand All @@ -118,8 +119,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: 12.0
odoo_pip_requirements_url: https://raw.githubusercontent.com/OCA/sample-oca-pip-requirements/12.0/requirements.txt
odoo_config_admin_passwd: SuPerPassWorD
environment:
LC_ALL: en_US.UTF-8
Expand All @@ -139,7 +140,7 @@ by Buildout:
roles:
- role: odoo
odoo_install_type: buildout
odoo_version: 11.0
odoo_version: 12.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 +157,7 @@ your Ansible inventory):
roles:
- role: odoo
odoo_install_type: buildout
odoo_version: 11.0
odoo_version: 12.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 +192,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: 12.0
odoo_repo_type: git
odoo_repo_url: https://SERVER/REPO
odoo_repo_rev: master
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ansible_ssh_pipelining: true

odoo_install_type: standard # standard, buildout
odoo_version: 11.0
odoo_version: 12.0
odoo_service: odoo
odoo_user: odoo
odoo_user_passwd: "*" # http://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module
Expand Down
2 changes: 2 additions & 0 deletions templates/odoo-12.0-pip-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://nightly.odoo.com/12.0/nightly/src/odoo_12.0.latest.zip
-e git+https://github.com/OCA/[email protected]#egg=odoo12_addon_date_range&subdirectory=setup/date_range
64 changes: 64 additions & 0 deletions templates/odoo-12.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 = 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 %}
1 change: 1 addition & 0 deletions templates/odoo-12.0.init
116 changes: 116 additions & 0 deletions vars/Ubuntu-18_Odoo-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---

odoo_debian_packages:
- python3-dev
- python3-pip
- python3-openssl
- python3-markupsafe
# Required by pyldap
- libldap2-dev
- libsasl2-dev
# Dependencies taken from the deb package
- python3-babel
- python3-chardet
- python3-dateutil
- python3-decorator
- python3-docutils
- python3-feedparser
- python3-gevent
- python3-html2text
- python3-jinja2
- python3-libsass
- python3-lxml
- python3-mako
- python3-mock
- python3-ofxparse
- python3-passlib
- python3-pil
- python3-psutil
- python3-psycopg2
- python3-pydot
- python3-pyldap
- python3-pyparsing
- python3-pypdf2
# python3-qrcode # Not available in Ubuntu 18.04
- python3-reportlab
- python3-requests
- python3-serial
- python3-suds
- python3-tz
- python3-usb
- python3-vatnumber
- python3-vobject
- python3-werkzeug
- python3-xlsxwriter

odoo_pypi_packages:
- xlwt
# - psycogreen
# - qrcode
# - pyldap
# - vobject

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
Loading