Pinakin Nayi (OpenERP) has proposed merging
lp:~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-event-warning-imp-pna
into lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr.
Requested reviews:
Kuldeep Joshi(OpenERP) (kjo-openerp)
For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-event-warning-imp-pna/+merge/114800
Hello ,
I improved Exceptions, Constraint errors and Warning message of
edi,email_template,event,fetchmail.
Thanks,
pna
--
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-event-warning-imp-pna/+merge/114800
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr.
=== modified file 'edi/edi_service.py'
--- edi/edi_service.py 2012-06-22 06:48:54 +0000
+++ edi/edi_service.py 2012-07-13 08:42:26 +0000
@@ -40,7 +40,7 @@
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 @@
# 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)
=== modified file 'edi/models/edi.py'
--- edi/models/edi.py 2012-06-28 11:49:05 +0000
+++ edi/models/edi.py 2012-07-13 08:42:26 +0000
@@ -129,7 +129,7 @@
_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
=== modified file 'event/event.py'
--- event/event.py 2012-07-09 14:58:32 +0000
+++ event/event.py 2012-07-13 08:42:26 +0000
@@ -102,7 +102,7 @@
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):
=== modified file 'event_moodle/event_moodle.py'
--- event_moodle/event_moodle.py 2012-04-23 10:20:03 +0000
+++ event_moodle/event_moodle.py 2012-07-13 08:42:26 +0000
@@ -54,7 +54,7 @@
"""
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 @@
"""
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):
"""
=== modified file 'event_sale/test/confirm.yml'
--- event_sale/test/confirm.yml 2012-02-29 08:34:31 +0000
+++ event_sale/test/confirm.yml 2012-07-13 08:42:26 +0000
@@ -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."))
=== modified file 'fetchmail/fetchmail.py'
--- fetchmail/fetchmail.py 2012-07-02 08:47:00 +0000
+++ fetchmail/fetchmail.py 2012-07-13 08:42:26 +0000
@@ -151,8 +151,8 @@
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:
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp