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

@@ -23,7 +23,7 @@
{ {
'name': 'Odoo Customize(Debranding, My Odoo)', 'name': 'Odoo Customize(Debranding, My Odoo)',
'version': '12.19.04.22', 'version': '12.19.04.30',
'author': 'Sunpop.cn', 'author': 'Sunpop.cn',
'category': 'Productivity', 'category': 'Productivity',
'website': 'https://www.sunpop.cn', 'website': 'https://www.sunpop.cn',
@@ -66,6 +66,7 @@
23. Add reset or clear website blog data 23. Add reset or clear website blog data
24. Customize Odoo Native Module(eg. Enterprise) Url 24. Customize Odoo Native Module(eg. Enterprise) Url
25. Add remove expense data 25. Add remove expense data
26. Add multi uninstall modules
This module can help to white label the Odoo. This module can help to white label the Odoo.
Also helpful for training and support for your odoo end-user. Also helpful for training and support for your odoo end-user.
@@ -83,9 +84,10 @@
# 'web_mobile' # 'web_mobile'
], ],
'data': [ 'data': [
'views/app_odoo_customize_view.xml', 'views/app_odoo_customize_views.xml',
'views/app_theme_config_settings_view.xml', 'views/app_theme_config_settings_views.xml',
'views/ir_model_view.xml', 'views/ir_model_views.xml',
'views/ir_views.xml',
# data # data
'data/ir_config_parameter.xml', 'data/ir_config_parameter.xml',
'data/ir_module_module.xml', 'data/ir_module_module.xml',

View File

@@ -3,4 +3,5 @@
from . import res_config_settings from . import res_config_settings
from . import ir_ui_view from . import ir_ui_view
from . import base_language_install from . import base_language_install
from . import models
# from . import mail_thread # 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']]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View File

@@ -29,6 +29,8 @@
<p>This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher, <p>This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher,
Online Documentation Access,Quick Data Clear. </p> Online Documentation Access,Quick Data Clear. </p>
<p class="mb16">Support Odoo 12, 11, 10, 9. Including communicate and enterprise version. </p> <p class="mb16">Support Odoo 12, 11, 10, 9. Including communicate and enterprise version. </p>
<h3>Update: v12.19.04.30</h3>
<p>26. Add multi uninstall modules</p>
<h3>Update: v12.19.04.18</h3> <h3>Update: v12.19.04.18</h3>
<p>25. Add remove expense data</p> <p>25. Add remove expense data</p>
<h3>Update: v12.19.04.17</h3> <h3>Update: v12.19.04.17</h3>

View File

@@ -2,7 +2,7 @@
<odoo> <odoo>
<!-- Modules --> <!-- Modules -->
<record id="app_module_tree" model="ir.ui.view"> <record id="app_module_tree" model="ir.ui.view">
<field name="name">app.ir.module.module.form</field> <field name="name">app.ir.module.module.tree</field>
<field name="model">ir.module.module</field> <field name="model">ir.module.module</field>
<field name="inherit_id" ref="base.module_tree" /> <field name="inherit_id" ref="base.module_tree" />
<field name="arch" type="xml"> <field name="arch" type="xml">

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="action_server_module_multi_uninstall" model="ir.actions.server">
<field name="name">Uninstall Modules</field>
<field name="type">ir.actions.server</field>
<field name="binding_model_id" ref="base.model_ir_module_module" />
<field name="model_id" ref="base.model_ir_module_module" />
<field name="state">code</field>
<field name="code">
if records:
records.module_multi_uninstall()
</field>
</record>
</data>
</odoo>