How do I uninstall a module in version 7.8.0?


I’ve tried changing the module’s status to “to remove” and then running trytond-admin --verbose -c ../trytond.conf -d trytond -u ir, but it always reactivates it, it doesn’t remove it.

@Xavi Neither in the web interface nor in the desktop client is the status change enabled, that’s exactly why I was asking.
I already found a way to do it:

  1. Set state to “to remove“ directly in ir_module table.
  2. Go to the desktop client, in admin/modules select the module, chose the action button and click apply,

But like @ced says, the deactivation does not work well. I’m working on a module that extends a party. The deactivation works “well” — the data of the module was erased, but not the info in ir.models and others… And now I can’t reinstall the module without manually cleaning those tables. Are there any standard mechanisms to make an “uninstall script”, or some mechanism like db migrations to guarantee consistency during development?

I tried reading the code and asking Claude for help to figure out how to handle it, but honestly neither Claude nor I are clear on what exactly needs to be cleaned up. I already know that traces are left in the ir_* tables, but I have no idea where else to look.
On top of that, I still haven’t found the exact code that handles module deactivation, nor how to enable the module state transitions — either through the buttons or the module form — so I don’t have to change the status directly in the database.
P.S.: Do you use the IRC channels frequently, or is it better to communicate here?

Hi,
You can manage your modules from the UI → Administration/modules, from there you have a button on each module to change its state to “to activate” or “to remove” then you have a second button to perform the update.
Hope this helps.

Be careful that the deactivation is a beta feature, it may left some data or the database schema unusable.