From 258d72812e8a6b02d7bb4968f52c33d036b42ef6 Mon Sep 17 00:00:00 2001 From: "Rajesh Prajapati (OpenERP)" Date: Fri, 21 Sep 2012 12:10:59 +0530 Subject: [PATCH 1/2] [IMP] Event : Traceback removed of confirm event button while moodle installed bzr revid: rpr@tinyerp.com-20120921064059-g16iuqs0jfy79f5q --- addons/event_moodle/event_moodle.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/event_moodle/event_moodle.py b/addons/event_moodle/event_moodle.py index 19e763e91b0..f36b1cd2d62 100644 --- a/addons/event_moodle/event_moodle.py +++ b/addons/event_moodle/event_moodle.py @@ -101,6 +101,8 @@ class event_moodle(osv.osv): """ #connect to moodle url = self.browse(cr, uid, id, context=context).url + if not url: + raise osv.except_osv(('Error!'),("First configure your moodle connection.")) sock = xmlrpclib.ServerProxy(url) return sock.core_course_create_courses(courses) From a00e014477f989945c227bd205cbed83fc56e3a1 Mon Sep 17 00:00:00 2001 From: "Rajesh Prajapati (OpenERP)" Date: Mon, 24 Sep 2012 10:53:14 +0530 Subject: [PATCH 2/2] [IMP] Event : made warning message translatable bzr revid: rpr@tinyerp.com-20120924052314-u5xyhyirqqu6uoqp --- addons/event_moodle/event_moodle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/event_moodle/event_moodle.py b/addons/event_moodle/event_moodle.py index f36b1cd2d62..f8433dc2294 100644 --- a/addons/event_moodle/event_moodle.py +++ b/addons/event_moodle/event_moodle.py @@ -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!'),("First configure your moodle connection.")) + 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): @@ -102,7 +102,7 @@ class event_moodle(osv.osv): #connect to moodle url = self.browse(cr, uid, id, context=context).url if not url: - raise osv.except_osv(('Error!'),("First configure your moodle connection.")) + raise osv.except_osv(_('Error!'),_("First configure your moodle connection.")) sock = xmlrpclib.ServerProxy(url) return sock.core_course_create_courses(courses)