opt customize

This commit is contained in:
ivan deng
2019-04-30 06:56:27 +08:00
parent 560d19e61c
commit 7233a05d72
10 changed files with 43 additions and 5 deletions

View File

@@ -3,4 +3,5 @@
from . import res_config_settings
from . import ir_ui_view
from . import base_language_install
from . import models
# from . import mail_thread

View File

@@ -0,0 +1,17 @@
# -*- 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']]