Merge lp:~openerp-dev/openobject-addons/7.0-opw-593069-msh into lp:openobject-addons/7.0

Proposed by Mohammed Shekha(Open ERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: no longer in the source branch.
Merged at revision: 9595
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-593069-msh
Merge into: lp:openobject-addons/7.0
Diff against target: 16 lines (+5/-1)
1 file modified
pad/pad.py (+5/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-593069-msh
Reviewer Review Type Date Requested Status
Martin Trigaux (OpenERP) (community) Approve
Naresh(OpenERP) (community) Approve
OpenERP Core Team Pending
Review via email: mp+166180@code.launchpad.net

Description of the change

Hello,

Fixed the issue of pad when there is no internet connection, it throws traceback instead of user freindly message.

Demo:- To reproduce simply remove pad widget from project task description_pad field(pad_porject module) and then create record without adding any data in description_pad field and then after creating record again set widget="pad" now remove internet connetion and just open just created record.

Result: Traceback
Expected: There should be user freindly message.

Thanks.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

LGTM, thanks for the patch

revno: 9595 [merge]
revision-id: <email address hidden>

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'pad/pad.py'
--- pad/pad.py 2013-04-19 14:42:38 +0000
+++ pad/pad.py 2013-05-29 07:02:26 +0000
@@ -39,7 +39,11 @@
39 #if create with content39 #if create with content
40 if "field_name" in context and "model" in context and "object_id" in context:40 if "field_name" in context and "model" in context and "object_id" in context:
41 myPad = EtherpadLiteClient( pad["key"], pad["server"]+'/api')41 myPad = EtherpadLiteClient( pad["key"], pad["server"]+'/api')
42 myPad.createPad(path)42 try:
43 myPad.createPad(path)
44 except urllib2.URLError:
45 raise osv.except_osv(_("Error"), _("Pad creation fail, \
46 either there is a problem with your pad server URL or with your connection."))
4347
44 #get attr on the field model48 #get attr on the field model
45 model = self.pool.get(context["model"])49 model = self.pool.get(context["model"])