coopdevs / coopdevs/odoo-role

Install Odoo python package after an issue between download and installation

Open
#130 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
13
Forks
21
Avg merge
8m
Merged PRs (30d)
1

Description

Right now the installation of `odoo` python package is skipped if the source has been already downloaded:

```
- name: Install Odoo
become: yes
become_user: "{{ odoo_role_odoo_user }}"
shell: "cd {{ odoo_role_odoo_path }} && {{ odoo_role_odoo_python_path }} setup.py install"
when: odoo_role_desired_tar_download.changed or odoo_role_desired_git_download.changed
```
Check source [here](https://github.com/coopdevs/odoo-role/blob/master/tasks/main.yml#L126).

But if the process is interrupted between the `import_tasks: download.yml` and the "Install Odoo" task, and you try to provision again, the condition on line 126 will be `false` and Odoo will not be installed.

As a result, while installing the Odoo community packages you will get an error similar to the following:
```
stderr: ERROR: Could not find a version that satisfies the requirement odoo<12.1dev,>=12.0a (from odoo12-addon-account-banking-mandate) (from versions: none)
```
It means that pip cannot find the `odoo` package, in this case needed as a dependency by the `odoo12-addon-account-banking-mandate` package.

Can we use a different `when` condition on line 126? For instance checking if the `odoo` package has been already installed?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.