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()
# 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)
_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
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):
"""
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):
"""
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):
"""
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."))
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: