mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
opt customize
This commit is contained in:
17
app_odoo_customize/models/models.py
Normal file
17
app_odoo_customize/models/models.py
Normal 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']]
|
||||
|
||||
Reference in New Issue
Block a user