Merge lp:~openerp-dev/openobject-client-web/6.0-opw-582169-msh into lp:openobject-client-web

Proposed by Mohammed Shekha(Open ERP)
Status: Merged
Merged at revision: 4911
Proposed branch: lp:~openerp-dev/openobject-client-web/6.0-opw-582169-msh
Merge into: lp:openobject-client-web
Diff against target: 20 lines (+2/-1)
1 file modified
addons/openerp/controllers/actions.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client-web/6.0-opw-582169-msh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+135133@code.launchpad.net

Description of the change

Hello,

Fixed the issue of timeout while printing report, put the openerp.server.timeout instead of putting attempt upto 200 second statically.

To face this, you have to print the report which takes more than 200 seconds, after 200 seconds you will get the message that "Printing aborted, too long delay", that is because we have set 200 attempts for printing report statically instead here I have set the timeout of report printing according Server Socket timeout.

Thanks.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/controllers/actions.py'
2--- addons/openerp/controllers/actions.py 2012-07-30 11:44:30 +0000
3+++ addons/openerp/controllers/actions.py 2012-11-20 12:13:24 +0000
4@@ -161,6 +161,7 @@
5 report_id = rpc.session.execute('report', 'report', name, ids, datas, ctx)
6 state = False
7 attempt = 0
8+ max_attempt = cherrypy.config.get('openerp.server.timeout') or 200
9 val = None
10 while not state:
11 val = rpc.session.execute('report', 'report_get', report_id)
12@@ -170,7 +171,7 @@
13 if not state:
14 time.sleep(1)
15 attempt += 1
16- if attempt>200:
17+ if attempt>max_attempt:
18 raise common.message(_('Printing aborted, too long delay'))
19
20 # report name