Skip to content
New issue

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

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

Already on GitHub? # to your account

Database creation fails when there are auto_update, non installable modules #95

Open
Jerther opened this issue May 31, 2017 · 1 comment

Comments

@Jerther
Copy link
Contributor

Jerther commented May 31, 2017

By doing this:

  • Odoo 10 (I believe this would also happen in earlier versions, but in this branch, project_timesheet_analytic_partner is auto_install and not installable which is needed for this issue)
  • Map this repository as an addon path in odoo config:
    https://github.com/OCA/project.git
  • Have erppeek create a database, then install module project_closing.

Actual result:
An Odoo error:

20170531 16:21:48.275 : FAIL : Pending actions:
  to install	project_timesheet_analytic_partner

This module is marked auto_install and not installable in its manifest file.

Expected result:
erppeek does not care about modules that are not needed by project_closing, and installs it.

Additional details:

  • If I manually create a new database via the web interface, the project_timesheet_analytic_partner is pending, but I can still successfully install project_closing.
  • I first thought Odoo was wrongfully trying to install those modules, but it turns out they're skipped, and it's a desired behavior.
  • Then I turned to OCA, and asked them about modules being auto_install, and they said it was intentional because these modules are "glue" modules.
  • I tried various things in erppeek.py in the _upgrade() method (around the "Safety check" comments) and I was planning on making a PR with some fix, but nothing worked and I eventually gave up.
@florentx
Copy link
Member

Not sure how to handle this case.
As a workaround, you can set the state of the culprit module:

pending_install = model('ir.module.module').browse(['state = to install'])
print(pending_install.name)

# Then force the state
pending_install.write({'state': 'uninstalled'})

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants