From bbb9d6bab1bec299e30ac78e4a9d936628179f5d Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 17 Dec 2009 15:19:35 +0100 Subject: [PATCH] [imp] improve deprecation warning message bzr revid: xmo@tinyerp.com-20091217141935-f6rdzkkjsmcu234s --- bin/addons/base/res/res_config.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/addons/base/res/res_config.py b/bin/addons/base/res/res_config.py index 52096575272..0060de4e1d1 100644 --- a/bin/addons/base/res/res_config.py +++ b/bin/addons/base/res/res_config.py @@ -109,6 +109,10 @@ class res_config_configurable(osv.osv_memory): return self.next(cr, uid, ids, context=context) res_config_configurable() +DEPRECATION_MESSAGE = 'You are using an addon using old-style configuration '\ + 'wizards (ir.actions.configuration.wizard). Old-style configuration '\ + 'wizards have been deprecated.\n'\ + 'The addon should be migrated to res.config objects.' class ir_actions_configuration_wizard(osv.osv_memory): ''' Compatibility configuration wizard @@ -138,9 +142,8 @@ class ir_actions_configuration_wizard(osv.osv_memory): def execute(self, cr, uid, ids, context=None): self.logger.notifyChannel( - 'configuration', netsvc.LOG_WARNING, - 'Addon using old-style configuration wizard, please migrate to '\ - 'res.config objects') + 'configuration', netsvc.LOG_WARNING, DEPRECATION_MESSAGE) + ir_actions_configuration_wizard() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: