Merge lp:~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-google-caldav-warning-msg-pna into lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr

Proposed by Pinakin Nayi (OpenERP)
Status: Merged
Merged at revision: 7026
Proposed branch: lp:~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-google-caldav-warning-msg-pna
Merge into: lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr
Diff against target: 100 lines (+9/-9)
5 files modified
caldav/calendar.py (+3/-3)
caldav/i18n/caldav.pot (+1/-1)
caldav/wizard/caldav_browse.py (+1/-1)
caldav/wizard/calendar_event_import.py (+1/-1)
google_docs/google_docs.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-google-caldav-warning-msg-pna
Reviewer Review Type Date Requested Status
Kuldeep Joshi(OpenERP) Approve
Review via email: mp+114801@code.launchpad.net

Description of the change

Hello,

  I improved Exceptions, Constraint errors and Warning message of google and caldav modules.

Thanks,
pna

To post a comment you must log in.
Revision history for this message
Kuldeep Joshi(OpenERP) (kjo-openerp) wrote :

Thank's for the work

Thanks
KJO

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'caldav/calendar.py'
--- caldav/calendar.py 2012-06-22 06:57:56 +0000
+++ caldav/calendar.py 2012-07-13 08:44:26 +0000
@@ -786,7 +786,7 @@
786 res = cr.fetchone()786 res = cr.fetchone()
787 if res:787 if res:
788 if res[0] > 0:788 if res[0] > 0:
789 raise osv.except_osv(_('Warning !'), _('Can not create line "%s" more than once') % (vals.get('name')))789 raise osv.except_osv(_('Warning !'), _('Cannot create line "%s" more than once.') % (vals.get('name')))
790 return super(basic_calendar_line, self).create(cr, uid, vals, context=context)790 return super(basic_calendar_line, self).create(cr, uid, vals, context=context)
791791
792basic_calendar_line()792basic_calendar_line()
@@ -876,7 +876,7 @@
876 line = line_obj.browse(cr, uid, l_id, context=context)[0]876 line = line_obj.browse(cr, uid, l_id, context=context)[0]
877 line_rel = line.object_id.model877 line_rel = line.object_id.model
878 if (relation != 'NULL') and (not relation == line_rel):878 if (relation != 'NULL') and (not relation == line_rel):
879 raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines') % (name))879 raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines.') % (name))
880 return True880 return True
881881
882 def create(self, cr, uid, vals, context=None):882 def create(self, cr, uid, vals, context=None):
@@ -1192,7 +1192,7 @@
1192 elif isinstance(child.value, datetime):1192 elif isinstance(child.value, datetime):
1193 # TODO1193 # TODO
1194 # remember, spec says this datetime is in UTC1194 # remember, spec says this datetime is in UTC
1195 raise NotImplementedError("we cannot parse absolute triggers")1195 raise NotImplementedError("We cannot parse absolute triggers.")
1196 if not seconds:1196 if not seconds:
1197 duration = abs(days)1197 duration = abs(days)
1198 related = days > 0 and 'after' or 'before'1198 related = days > 0 and 'after' or 'before'
11991199
=== modified file 'caldav/i18n/caldav.pot'
--- caldav/i18n/caldav.pot 2012-05-10 12:49:11 +0000
+++ caldav/i18n/caldav.pot 2012-07-13 08:44:26 +0000
@@ -365,7 +365,7 @@
365#. module: caldav365#. module: caldav
366#: code:addons/caldav/wizard/calendar_event_import.py:63366#: code:addons/caldav/wizard/calendar_event_import.py:63
367#, python-format367#, python-format
368msgid "Invalid format of the ics, file can not be imported"368msgid "Invalid format of the ics, file cannot be imported."
369msgstr ""369msgstr ""
370370
371#. module: caldav371#. module: caldav
372372
=== modified file 'caldav/wizard/caldav_browse.py'
--- caldav/wizard/caldav_browse.py 2011-12-19 16:54:40 +0000
+++ caldav/wizard/caldav_browse.py 2012-07-13 08:44:26 +0000
@@ -178,7 +178,7 @@
178 res = {}178 res = {}
179 host = context.get('host')179 host = context.get('host')
180 if not config.get_misc('webdav','enable',True):180 if not config.get_misc('webdav','enable',True):
181 raise Exception("WebDAV is disabled, cannot continue")181 raise Exception("WebDAV is disabled, cannot continue.")
182 user_pool = self.pool.get('res.users')182 user_pool = self.pool.get('res.users')
183 current_user = user_pool.browse(cr, uid, uid, context=context)183 current_user = user_pool.browse(cr, uid, uid, context=context)
184 #TODO write documentation184 #TODO write documentation
185185
=== modified file 'caldav/wizard/calendar_event_import.py'
--- caldav/wizard/calendar_event_import.py 2012-05-10 12:49:11 +0000
+++ caldav/wizard/calendar_event_import.py 2012-07-13 08:44:26 +0000
@@ -60,7 +60,7 @@
60 try:60 try:
61 vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)61 vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
62 except:62 except:
63 raise osv.except_osv(_('Warning !'),_('Invalid format of the ics, file can not be imported'))63 raise osv.except_osv(_('Warning !'),_('Invalid format of the ics, file cannot be imported.'))
64 global cnt64 global cnt
65 if vals:65 if vals:
66 cnt = len(vals)66 cnt = len(vals)
6767
=== modified file 'google_docs/google_docs.py'
--- google_docs/google_docs.py 2012-05-23 11:02:15 +0000
+++ google_docs/google_docs.py 2012-07-13 08:44:26 +0000
@@ -27,7 +27,7 @@
27 from gdata.docs.service import DOCUMENT_LABEL27 from gdata.docs.service import DOCUMENT_LABEL
28 import gdata.auth28 import gdata.auth
29except ImportError:29except ImportError:
30 raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list'))30 raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list.'))
3131
32class google_docs_ir_attachment(osv.osv):32class google_docs_ir_attachment(osv.osv):
33 _inherit = 'ir.attachment'33 _inherit = 'ir.attachment'
@@ -46,7 +46,7 @@
46 #login gmail account46 #login gmail account
47 client = google_pool.google_login( user_config['user'], user_config['password'], type='docs_client', context=context)47 client = google_pool.google_login( user_config['user'], user_config['password'], type='docs_client', context=context)
48 if not client:48 if not client:
49 raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in users/synchronization"))49 raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in Users/Users/Synchronization tab."))
50 return client50 return client
5151
52 def create_empty_google_doc(self, cr, uid, res_model, res_id, context=None):52 def create_empty_google_doc(self, cr, uid, res_model, res_id, context=None):
@@ -88,7 +88,7 @@
88 #copy the document you choose in the configuration88 #copy the document you choose in the configuration
89 copy_resource = client.copy_resource(original_resource, 'copy_%s' % original_resource.title.text)89 copy_resource = client.copy_resource(original_resource, 'copy_%s' % original_resource.title.text)
90 except:90 except:
91 raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL"))91 raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL."))
92 # create an ir.attachment92 # create an ir.attachment
93 self.create(cr, uid, {93 self.create(cr, uid, {
94 'res_model': res_model,94 'res_model': res_model,

Subscribers

People subscribed via source and target branches