diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index fe10e10f7b4..e1e0fccd253 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -586,8 +586,8 @@ class account_invoice(osv.osv): pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False if not rec_res_id and not pay_res_id: - raise osv.except_osv(_('Configuration Error!'), - _('Cannot find a chart of account, you should create one from Settings\Configuration\Accounting menu.')) + raise self.pool.get('res.config.settings').get_config_warning(cr, _('Cannot find any chart of account: you can create a new one from %(menu:account.menu_account_config)s.'), context) + if type in ('out_invoice', 'out_refund'): acc_id = rec_res_id else: diff --git a/addons/auth_signup/res_users.py b/addons/auth_signup/res_users.py index 077a0feded9..4e86de5b474 100644 --- a/addons/auth_signup/res_users.py +++ b/addons/auth_signup/res_users.py @@ -268,7 +268,7 @@ class res_users(osv.Model): mail_state = mail_obj.read(cr, uid, mail_id, ['state'], context=context) if mail_state and mail_state['state'] == 'exception': - raise osv.except_osv(_("Cannot send email: no outgoing email server configured.\nYou can configure it under Settings/General Settings."), user.name) + raise self.pool.get('res.config.settings').get_config_warning(cr, _("Cannot send email: no outgoing email server configured.\nYou can configure it under %(menu:base_setup.menu_general_configuration)s."), context) else: return { 'type': 'ir.actions.client',