diff --git a/app_odoo_customize/__manifest__.py b/app_odoo_customize/__manifest__.py index e044a131..42e44ec9 100644 --- a/app_odoo_customize/__manifest__.py +++ b/app_odoo_customize/__manifest__.py @@ -57,7 +57,7 @@ 14. Quick delete test data in Apps: Sales/POS/Purchase/MRP/Inventory/Accounting/Project/Message/Workflow etc. 15. Reset All the Sequence to beginning of 1: SO/PO/MO/Invoice... 16. Fix odoo reload module translation bug while enable english language - 17. Stop Odoo Auto Subscribe(Performance Improve) + 17. Stop Odoo Auto Subscribe(Moved to app_odoo_boost) 18. Show/Hide Author and Website in Apps Dashboard 19. One Click to clear all data (Sometime pls click twice) 20. Show quick upgrade in app dashboard, click to show module info not go to odoo.com diff --git a/app_odoo_customize/data/ir_config_parameter.xml b/app_odoo_customize/data/ir_config_parameter.xml index 099b27d2..09db64d3 100644 --- a/app_odoo_customize/data/ir_config_parameter.xml +++ b/app_odoo_customize/data/ir_config_parameter.xml @@ -42,11 +42,6 @@ app_show_poweredby False - - app_stop_subscribe - False - - app_documentation_url https://www.sunpop.cn/documentation/user/12.0/zh_CN/index.html diff --git a/app_odoo_customize/models/__init__.py b/app_odoo_customize/models/__init__.py index 839c37e2..eef28c79 100644 --- a/app_odoo_customize/models/__init__.py +++ b/app_odoo_customize/models/__init__.py @@ -5,4 +5,3 @@ from . import ir_ui_view from . import base_language_install from . import models # from . import ir_ui_menu -# from . import mail_thread diff --git a/app_odoo_customize/models/mail_thread.py b/app_odoo_customize/models/mail_thread.py deleted file mode 100644 index 3b1e54d2..00000000 --- a/app_odoo_customize/models/mail_thread.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2017 Jarvis (www.odoomod.com) -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). - -from odoo import api, fields, models, _ - - -class MailThread(models.AbstractModel): - _inherit = "mail.thread" - - def message_subscribe(self, partner_ids=None, channel_ids=None, subtype_ids=None, force=True): - """ 停用订阅功能. """ - ir_config = self.env['ir.config_parameter'] - app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False - if app_stop_subscribe: - return - else: - return super(MailThread, self).message_subscribe(partner_ids, channel_ids, subtype_ids, force) - - def message_auto_subscribe(self, updated_fields, values=None): - """ 停用订阅功能. """ - ir_config = self.env['ir.config_parameter'] - app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False - if app_stop_subscribe: - return - else: - return super(MailThread, self).message_auto_subscribe(updated_fields, values) - - def _message_auto_subscribe_notify(self, partner_ids): - """ 停用订阅功能. """ - ir_config = self.env['ir.config_parameter'] - app_stop_subscribe = False if ir_config.get_param('app_stop_subscribe') == "True" else False - if app_stop_subscribe: - return - else: - return super(MailThread, self)._message_auto_subscribe_notify(partner_ids) \ No newline at end of file diff --git a/app_odoo_customize/models/res_config_settings.py b/app_odoo_customize/models/res_config_settings.py index a9b74c5d..c8a75bed 100644 --- a/app_odoo_customize/models/res_config_settings.py +++ b/app_odoo_customize/models/res_config_settings.py @@ -10,21 +10,20 @@ _logger = logging.getLogger(__name__) class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' - app_system_name = fields.Char('System Name', help=u"Setup System Name,which replace Odoo") + app_system_name = fields.Char('System Name', help="Setup System Name,which replace Odoo") app_show_lang = fields.Boolean('Show Quick Language Switcher', - help=u"When enable,User can quick switch language in user menu") - app_show_debug = fields.Boolean('Show Quick Debug', help=u"When enable,everyone login can see the debug menu") - app_show_documentation = fields.Boolean('Show Documentation', help=u"When enable,User can visit user manual") + help="When enable,User can quick switch language in user menu") + app_show_debug = fields.Boolean('Show Quick Debug', help="When enable,everyone login can see the debug menu") + app_show_documentation = fields.Boolean('Show Documentation', help="When enable,User can visit user manual") app_show_documentation_dev = fields.Boolean('Show Developer Documentation', - help=u"When enable,User can visit development documentation") - app_show_support = fields.Boolean('Show Support', help=u"When enable,User can vist your support site") - app_show_account = fields.Boolean('Show My Account', help=u"When enable,User can login to your website") - app_show_enterprise = fields.Boolean('Show Enterprise Tag', help=u"Uncheck to hide the Enterprise tag") - app_show_share = fields.Boolean('Show Share Dashboard', help=u"Uncheck to hide the Odoo Share Dashboard") - app_show_poweredby = fields.Boolean('Show Powered by Odoo', help=u"Uncheck to hide the Powered by text") - app_stop_subscribe = fields.Boolean('Stop Odoo Subscribe(Performance Improve)', help=u"Check to stop Odoo Subscribe function") + help="When enable,User can visit development documentation") + app_show_support = fields.Boolean('Show Support', help="When enable,User can vist your support site") + app_show_account = fields.Boolean('Show My Account', help="When enable,User can login to your website") + app_show_enterprise = fields.Boolean('Show Enterprise Tag', help="Uncheck to hide the Enterprise tag") + app_show_share = fields.Boolean('Show Share Dashboard', help="Uncheck to hide the Odoo Share Dashboard") + app_show_poweredby = fields.Boolean('Show Powered by Odoo', help="Uncheck to hide the Powered by text") group_show_author_in_apps = fields.Boolean(string="Show Author in Apps Dashboard", implied_group='app_odoo_customize.group_show_author_in_apps', - help=u"Uncheck to Hide Author and Website in Apps Dashboard") + help="Uncheck to Hide Author and Website in Apps Dashboard") app_documentation_url = fields.Char('Documentation Url') app_documentation_dev_url = fields.Char('Developer Documentation Url') @@ -48,7 +47,6 @@ class ResConfigSettings(models.TransientModel): app_show_enterprise = True if ir_config.get_param('app_show_enterprise') == "True" else False app_show_share = True if ir_config.get_param('app_show_share') == "True" else False app_show_poweredby = True if ir_config.get_param('app_show_poweredby') == "True" else False - app_stop_subscribe = True if ir_config.get_param('app_stop_subscribe') == "True" else False app_documentation_url = ir_config.get_param('app_documentation_url', default='https://www.sunpop.cn/documentation/user/12.0/en/index.html') @@ -69,7 +67,6 @@ class ResConfigSettings(models.TransientModel): app_show_enterprise=app_show_enterprise, app_show_share=app_show_share, app_show_poweredby=app_show_poweredby, - app_stop_subscribe=app_stop_subscribe, app_documentation_url=app_documentation_url, app_documentation_dev_url=app_documentation_dev_url, @@ -93,7 +90,6 @@ class ResConfigSettings(models.TransientModel): ir_config.set_param("app_show_enterprise", self.app_show_enterprise or "False") ir_config.set_param("app_show_share", self.app_show_share or "False") ir_config.set_param("app_show_poweredby", self.app_show_poweredby or "False") - ir_config.set_param("app_stop_subscribe", self.app_stop_subscribe or "False") ir_config.set_param("app_documentation_url", self.app_documentation_url or "https://www.sunpop.cn/documentation/user/12.0/en/index.html") diff --git a/app_odoo_customize/views/app_theme_config_settings_views.xml b/app_odoo_customize/views/app_theme_config_settings_views.xml index c97843cf..e7847e8d 100644 --- a/app_odoo_customize/views/app_theme_config_settings_views.xml +++ b/app_odoo_customize/views/app_theme_config_settings_views.xml @@ -62,10 +62,6 @@