diff --git a/app_odoo_customize/__manifest__.py b/app_odoo_customize/__manifest__.py index 2f4c2110..7dfe20f7 100644 --- a/app_odoo_customize/__manifest__.py +++ b/app_odoo_customize/__manifest__.py @@ -23,7 +23,7 @@ { 'name': 'App Odoo Customize(Backend Debranding Title,Language,Documentation,Quick Debug,Clear Data)', - 'version': '12.19.1.06', + 'version': '12.19.1.20', 'author': 'Sunpop.cn', 'category': 'Productivity', 'website': 'http://www.sunpop.cn', diff --git a/app_odoo_customize/models/res_config_settings.py b/app_odoo_customize/models/res_config_settings.py index 09dcd194..0ec9fbbb 100644 --- a/app_odoo_customize/models/res_config_settings.py +++ b/app_odoo_customize/models/res_config_settings.py @@ -10,7 +10,6 @@ _logger = logging.getLogger(__name__) class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' - _description = u"App Odoo Customize settings" app_system_name = fields.Char('System Name', help=u"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") @@ -35,28 +34,29 @@ class ResConfigSettings(models.TransientModel): @api.model def get_values(self): - ir_config = self.env['ir.config_parameter'] - app_system_name = ir_config.sudo().get_param('app_system_name', default='odooApp') + res = super(ResConfigSettings, self).get_values() + ir_config = self.env['ir.config_parameter'].sudo() + app_system_name = ir_config.get_param('app_system_name', default='odooApp') - app_show_lang = True if ir_config.sudo().get_param('app_show_lang') == "True" else False - app_show_debug = True if ir_config.sudo().get_param('app_show_debug') == "True" else False - app_show_documentation = True if ir_config.sudo().get_param('app_show_documentation') == "True" else False - app_show_documentation_dev = True if ir_config.sudo().get_param('app_show_documentation_dev') == "True" else False - app_show_support = True if ir_config.sudo().get_param('app_show_support') == "True" else False - app_show_account = True if ir_config.sudo().get_param('app_show_account') == "True" else False - app_show_enterprise = True if ir_config.sudo().get_param('app_show_enterprise') == "True" else False - app_show_share = True if ir_config.sudo().get_param('app_show_share') == "True" else False - app_show_poweredby = True if ir_config.sudo().get_param('app_show_poweredby') == "True" else False - app_stop_subscribe = True if ir_config.sudo().get_param('app_stop_subscribe') == "True" else False + app_show_lang = True if ir_config.get_param('app_show_lang') == "True" else False + app_show_debug = True if ir_config.get_param('app_show_debug') == "True" else False + app_show_documentation = True if ir_config.get_param('app_show_documentation') == "True" else False + app_show_documentation_dev = True if ir_config.get_param('app_show_documentation_dev') == "True" else False + app_show_support = True if ir_config.get_param('app_show_support') == "True" else False + app_show_account = True if ir_config.get_param('app_show_account') == "True" else False + 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.sudo().get_param('app_documentation_url', + app_documentation_url = ir_config.get_param('app_documentation_url', default='http://www.sunpop.cn/documentation/user/12.0/en/index.html') - app_documentation_dev_url = ir_config.sudo().get_param('app_documentation_dev_url', + app_documentation_dev_url = ir_config.get_param('app_documentation_dev_url', default='http://www.sunpop.cn/documentation/12.0/index.html') - app_support_url = ir_config.sudo().get_param('app_support_url', default='http://www.sunpop.cn/trial/') - app_account_title = ir_config.sudo().get_param('app_account_title', default='My Online Account') - app_account_url = ir_config.sudo().get_param('app_account_url', default='http://www.sunpop.cn/my-account/') - return dict( + app_support_url = ir_config.get_param('app_support_url', default='http://www.sunpop.cn/trial/') + app_account_title = ir_config.get_param('app_account_title', default='My Online Account') + app_account_url = ir_config.get_param('app_account_url', default='http://www.sunpop.cn/my-account/') + res.update( app_system_name=app_system_name, app_show_lang=app_show_lang, app_show_debug=app_show_debug, @@ -75,11 +75,12 @@ class ResConfigSettings(models.TransientModel): app_account_title=app_account_title, app_account_url=app_account_url ) + return res @api.multi def set_values(self): - self.ensure_one() - ir_config = self.env['ir.config_parameter'] + super(ResConfigSettings, self).set_values() + ir_config = self.env['ir.config_parameter'].sudo() ir_config.set_param("app_system_name", self.app_system_name or "") ir_config.set_param("app_show_lang", self.app_show_lang or "False") ir_config.set_param("app_show_debug", self.app_show_debug or "False") @@ -91,7 +92,6 @@ class ResConfigSettings(models.TransientModel): 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("group_show_author_in_apps", self.group_show_author_in_apps or "False") ir_config.set_param("app_documentation_url", self.app_documentation_url or "http://www.sunpop.cn/documentation/user/12.0/en/index.html") @@ -101,8 +101,6 @@ class ResConfigSettings(models.TransientModel): ir_config.set_param("app_account_title", self.app_account_title or "My Online Account") ir_config.set_param("app_account_url", self.app_account_url or "http://www.sunpop.cn/my-account/") - return True - @api.multi def remove_sales(self): to_removes = [ diff --git a/app_odoo_customize/static/description/banner.gif b/app_odoo_customize/static/description/banner.gif index 31d82d11..16d33ae1 100644 Binary files a/app_odoo_customize/static/description/banner.gif and b/app_odoo_customize/static/description/banner.gif differ diff --git a/app_odoo_customize/static/description/index.html b/app_odoo_customize/static/description/index.html index 195d0b82..3ca2bea7 100644 --- a/app_odoo_customize/static/description/index.html +++ b/app_odoo_customize/static/description/index.html @@ -6,6 +6,8 @@
This moduld allows user to quickly customize and debranding Odoo. Quick debug, Language Switcher, Online Documentation Access,Quick Data Clear.
Support Odoo 12, 11, 10, 9. Including communicate and enterprise version.
+Fix bug: Save config error.
Fix bug: If you install Muk moudle, odooapp customize would pop error like "attachment_location". Sometime you need to uninstall this app and restart odoo, install again to take affect.