[IMP]edi-event-email_template-fetchmail-warning-msg

bzr revid: pna@tinyerp.com-20120712122459-hvvxq5nqrtfxv3ei
This commit is contained in:
Pinakin Nayi (OpenERP) 2012-07-12 17:54:59 +05:30
parent 6cbb04758a
commit 62e4a52f2d
6 changed files with 9 additions and 9 deletions

View File

@ -40,7 +40,7 @@ class edi(netsvc.ExportService):
res = getattr(edi_document, method_name)(cr, *method_args)
cr.commit()
except Exception:
_logger.exception('Failed to execute EDI method %s with args %r', method_name, method_args)
_logger.exception('Failed to execute EDI method %s with args %r.', method_name, method_args)
raise
finally:
cr.close()
@ -63,7 +63,7 @@ class edi(netsvc.ExportService):
# No security check for these methods
pass
else:
raise KeyError("Method not found: %s" % method)
raise KeyError("Method not found: %s." % method)
fn = getattr(self, 'exp_'+method)
return fn(*params)

View File

@ -129,7 +129,7 @@ class edi_document(osv.osv):
_logger.debug("get_document(%s)", edi_token)
edi_ids = self.search(cr, uid, [('name','=', edi_token)], context=context)
if not edi_ids:
raise ValueError('Invalid EDI token: %s' % edi_token)
raise ValueError('Invalid EDI token: %s.' % edi_token)
edi = self.browse(cr, uid, edi_ids[0], context=context)
return edi.document

View File

@ -102,7 +102,7 @@ class event_event(osv.osv):
for self.event in self.browse(cr, uid, ids, context=context):
total_confirmed = self.event.register_current
if total_confirmed < self.event.register_min or total_confirmed > self.event.register_max and self.event.register_max!=0:
raise osv.except_osv(_('Error!'),_("The total of confirmed registration for the event '%s' does not meet the expected minimum/maximum. You should maybe reconsider those limits before going further") % (self.event.name))
raise osv.except_osv(_('Error!'),_("The total of confirmed registration for the event '%s' does not meet the expected minimum/maximum. Please reconsider those limits before going further.") % (self.event.name))
def check_registration_limits_before(self, cr, uid, ids, no_of_registration, context=None):
for event in self.browse(cr, uid, ids, context=context):

View File

@ -54,7 +54,7 @@ class event_moodle(osv.osv):
"""
moodle_config_wiz_ids = self.search(cr, uid, [], context=context)
if not moodle_config_wiz_ids:
raise osv.except_osv(('Error!'),("Configure your moodle connexion before"))
raise osv.except_osv(('Error!'),("First configure your moodle connection."))
return moodle_config_wiz_ids[0]
def make_url(self, cr, uid, ids, context=None):
@ -132,7 +132,7 @@ class event_moodle(osv.osv):
"""
if email:
if (email.count('@') != 1 and email.count('.') < 1):
raise osv.except_osv(_('Error!'),_("Your email '%s' is wrong") % (email))
raise osv.except_osv(_('Error!'),_("Your email '%s' is wrong.") % (email))
def make_username(self, username, response_courses):
"""

View File

@ -50,5 +50,5 @@
order = self.pool.get('sale.order').browse(cr, uid,order_id)
registration_ids = self.search(cr,uid,[('origin','=',order.name)])
if registration_ids == []:
raise osv.except_osv(_('Error!'),_("The registration is not created"))
raise osv.except_osv(_('Error!'),_("The registration is not created."))

View File

@ -151,8 +151,8 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
connection = server.connect()
server.write({'state':'done'})
except Exception, e:
_logger.exception("Failed to connect to %s server %s", server.type, server.name)
raise osv.except_osv(_("Connection test failed!"), _("Here is what we got instead:\n %s") % tools.ustr(e))
_logger.exception("Failed to connect to %s server %s.", server.type, server.name)
raise osv.except_osv(_("Connection test failed!"), _("Here is what we got instead:\n %s.") % tools.ustr(e))
finally:
try:
if connection: