Skip to content

Install Odoo python package after an issue between download and installation #130

@enricostano

Description

@enricostano

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.

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions