Comment 0 for bug 1371790

Revision history for this message
Egor Tsinko (etsinko) wrote :

Oerplib fails to generate reports when OpenERP 7.0 is running in multi-process mode using 'workers=N'.

Steps to reproduce:

1. make sure that workers = N (where N > 0) is in openerp-server.conf

2. Create a new database with demo data enabled

3. install 'warehouse' and 'sale' modules. These modules will create demo sale order

4. Use the following snippet to see the error:

#========================================================================================
import oerplib

oerp = oerplib.OERP(server='localhost', database='test', version='7.0')
oerp.login(user='admin', passwd='test')

print oerp.report('sale.order', 'sale.sale', [8])
#========================================================================================

The following error is produced:

Traceback (most recent call last):
  File "/home/etsinko/work/PyqtTest/pyqt/widgets/test.py", line 7, in <module>
    print oerp.report('sale.order', 'sale.sale', [8])
  File "/usr/local/lib/python2.7/dist-packages/oerplib/oerp.py", line 317, in report
    report_type, context)
  File "/usr/local/lib/python2.7/dist-packages/oerplib/oerp.py", line 347, in _get_report_data
    raise error.RPCError("Unknown error occurred during the "
oerplib.error.RPCError: Unknown error occurred during the download of the report.

5. If you set workers = 0 in openerp-server.conf the snippet prints out the name of the temporary file in which report is contained