Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-582169-msh into 
lp:openobject-client-web.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-582169-msh/+merge/135133

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.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-582169-msh/+merge/135133
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-582169-msh.
=== modified file 'addons/openerp/controllers/actions.py'
--- addons/openerp/controllers/actions.py	2012-07-30 11:44:30 +0000
+++ addons/openerp/controllers/actions.py	2012-11-20 12:13:24 +0000
@@ -161,6 +161,7 @@
         report_id = rpc.session.execute('report', 'report', name, ids, datas, ctx)
         state = False
         attempt = 0
+        max_attempt = cherrypy.config.get('openerp.server.timeout') or 200
         val = None
         while not state:
             val = rpc.session.execute('report', 'report_get', report_id)
@@ -170,7 +171,7 @@
             if not state:
                 time.sleep(1)
                 attempt += 1
-            if attempt>200:
+            if attempt>max_attempt:
                 raise common.message(_('Printing aborted, too long delay'))
 
         # report name

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to