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
1=== modified file 'caldav/calendar.py'
2--- caldav/calendar.py 2012-06-22 06:57:56 +0000
3+++ caldav/calendar.py 2012-07-13 08:44:26 +0000
4@@ -786,7 +786,7 @@
5 res = cr.fetchone()
6 if res:
7 if res[0] > 0:
8- raise osv.except_osv(_('Warning !'), _('Can not create line "%s" more than once') % (vals.get('name')))
9+ raise osv.except_osv(_('Warning !'), _('Cannot create line "%s" more than once.') % (vals.get('name')))
10 return super(basic_calendar_line, self).create(cr, uid, vals, context=context)
11
12 basic_calendar_line()
13@@ -876,7 +876,7 @@
14 line = line_obj.browse(cr, uid, l_id, context=context)[0]
15 line_rel = line.object_id.model
16 if (relation != 'NULL') and (not relation == line_rel):
17- raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines') % (name))
18+ raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines.') % (name))
19 return True
20
21 def create(self, cr, uid, vals, context=None):
22@@ -1192,7 +1192,7 @@
23 elif isinstance(child.value, datetime):
24 # TODO
25 # remember, spec says this datetime is in UTC
26- raise NotImplementedError("we cannot parse absolute triggers")
27+ raise NotImplementedError("We cannot parse absolute triggers.")
28 if not seconds:
29 duration = abs(days)
30 related = days > 0 and 'after' or 'before'
31
32=== modified file 'caldav/i18n/caldav.pot'
33--- caldav/i18n/caldav.pot 2012-05-10 12:49:11 +0000
34+++ caldav/i18n/caldav.pot 2012-07-13 08:44:26 +0000
35@@ -365,7 +365,7 @@
36 #. module: caldav
37 #: code:addons/caldav/wizard/calendar_event_import.py:63
38 #, python-format
39-msgid "Invalid format of the ics, file can not be imported"
40+msgid "Invalid format of the ics, file cannot be imported."
41 msgstr ""
42
43 #. module: caldav
44
45=== modified file 'caldav/wizard/caldav_browse.py'
46--- caldav/wizard/caldav_browse.py 2011-12-19 16:54:40 +0000
47+++ caldav/wizard/caldav_browse.py 2012-07-13 08:44:26 +0000
48@@ -178,7 +178,7 @@
49 res = {}
50 host = context.get('host')
51 if not config.get_misc('webdav','enable',True):
52- raise Exception("WebDAV is disabled, cannot continue")
53+ raise Exception("WebDAV is disabled, cannot continue.")
54 user_pool = self.pool.get('res.users')
55 current_user = user_pool.browse(cr, uid, uid, context=context)
56 #TODO write documentation
57
58=== modified file 'caldav/wizard/calendar_event_import.py'
59--- caldav/wizard/calendar_event_import.py 2012-05-10 12:49:11 +0000
60+++ caldav/wizard/calendar_event_import.py 2012-07-13 08:44:26 +0000
61@@ -60,7 +60,7 @@
62 try:
63 vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
64 except:
65- raise osv.except_osv(_('Warning !'),_('Invalid format of the ics, file can not be imported'))
66+ raise osv.except_osv(_('Warning !'),_('Invalid format of the ics, file cannot be imported.'))
67 global cnt
68 if vals:
69 cnt = len(vals)
70
71=== modified file 'google_docs/google_docs.py'
72--- google_docs/google_docs.py 2012-05-23 11:02:15 +0000
73+++ google_docs/google_docs.py 2012-07-13 08:44:26 +0000
74@@ -27,7 +27,7 @@
75 from gdata.docs.service import DOCUMENT_LABEL
76 import gdata.auth
77 except ImportError:
78- raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list'))
79+ raise osv.except_osv(_('Google Docs Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list.'))
80
81 class google_docs_ir_attachment(osv.osv):
82 _inherit = 'ir.attachment'
83@@ -46,7 +46,7 @@
84 #login gmail account
85 client = google_pool.google_login( user_config['user'], user_config['password'], type='docs_client', context=context)
86 if not client:
87- raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in users/synchronization"))
88+ raise osv.except_osv( _('Google Docs Error!'), _("Check your google configuration in Users/Users/Synchronization tab."))
89 return client
90
91 def create_empty_google_doc(self, cr, uid, res_model, res_id, context=None):
92@@ -88,7 +88,7 @@
93 #copy the document you choose in the configuration
94 copy_resource = client.copy_resource(original_resource, 'copy_%s' % original_resource.title.text)
95 except:
96- raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL"))
97+ raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL."))
98 # create an ir.attachment
99 self.create(cr, uid, {
100 'res_model': res_model,

Subscribers

People subscribed via source and target branches