Fault tolerant when opening sxw/rml
bzr revid: ced-96faa0736a0166cb76272292647950e9b5b40e6f
This commit is contained in:
@@ -91,8 +91,11 @@ class report_xml(osv.osv):
|
||||
for report in self.browse(cursor, user, ids, context=context):
|
||||
data = report[name + '_data']
|
||||
if not data and report[name[:-8]]:
|
||||
fp = tools.file_open(report[name[:-8]], mode='rb')
|
||||
data = fp.read()
|
||||
try:
|
||||
fp = tools.file_open(report[name[:-8]], mode='rb')
|
||||
data = fp.read()
|
||||
except:
|
||||
data = False
|
||||
res[report.id] = data
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user