tinyerp / odooly

Python library and CLI to interact with Odoo and OpenERP.
https://odooly.rtfd.io/
Other
60 stars 33 forks source link

Cannot uninstall modules #15

Open Jerther opened 2 years ago

Jerther commented 2 years ago

odooly.Client(...).env.uninstall('some_module')

I get:

One or more of the selected modules have already been uninstalled

Because of this line that is executed before the button_uninstall method is actually called: sel.write({'state': 'to remove'})

Odoo checks if the module's state is either "installed" or "to upgrade" before uninstalling and if it is not, it throws said error.

If I comment out the write line in odooly, it works fine.

Now the line just above it is a comment that says "# A trick to uninstall dependent add-ons" so I wouldn't call removing the line a sure fix yet...