[FIX] setup Environment for the report thread
This commit is contained in:
parent
4acee39f80
commit
8083afe7c3
|
@ -87,6 +87,7 @@ def exp_report(db, uid, object, ids, datas=None, context=None):
|
||||||
self_reports[id] = {'uid': uid, 'result': False, 'state': False, 'exception': None}
|
self_reports[id] = {'uid': uid, 'result': False, 'state': False, 'exception': None}
|
||||||
|
|
||||||
def go(id, uid, ids, datas, context):
|
def go(id, uid, ids, datas, context):
|
||||||
|
with openerp.api.Environment.manage():
|
||||||
cr = openerp.registry(db).cursor()
|
cr = openerp.registry(db).cursor()
|
||||||
try:
|
try:
|
||||||
result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
|
result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
|
||||||
|
|
Loading…
Reference in New Issue