mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
18 lines
572 B
Python
18 lines
572 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import models, fields, api
|
|
|
|
|
|
class Module(models.Model):
|
|
_inherit = 'ir.module.module'
|
|
|
|
@api.multi
|
|
def module_multi_uninstall(self):
|
|
""" Perform the various steps required to uninstall a module completely
|
|
including the deletion of all database structures created by the module:
|
|
tables, columns, constraints, etc.
|
|
"""
|
|
modules = self.browse(self.env.context.get('active_ids'))
|
|
[module.button_immediate_uninstall() for module in modules if module not in ['base', 'web']]
|
|
|