Knowledge Forum

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

1

To Uninstall module from odoo shall script

Avatar
Harsh Bhatt

Run Odoo with shell command and execute below script

python3 /opt/odoo14/odoo/odoo-bin shell -c /opt/odoo14/conf/odoo14-server.conf -d production_migrated

self.env['ir.module.module'].update_list()

self._cr.commit()

module_list = ['advance_purchase_ordering_ept', 'agro-odoo-shopify', 'hr_attendance_print', 'intercompany_transaction_ept', 'inventory_coverage_report_ept', 'l10n_mx_edi_bank', 'l10n_mx_edi_landing_marvelsa', 'l10n_mx_edi_reports', 'l10n_mx_edi_transfer', 'mandrake-master', 'merge_purchase_order',]

self.env['ir.module.module'].search([('state','=','installed'),('name','in',module_list )]).button_immediate_uninstall();

1 Comment
Avatar
Discard
Avatar
Harsh Bhatt
-

To upgrade

self.env['ir.module.module'].search([('name','=','setu_access_rights')]).button_immediate_upgrade();

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!