c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #07472
[Bug 586066] Re: IOError when running a report that contains an image
** Branch linked: lp:openobject-server/5.0
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/586066
Title:
IOError when running a report that contains an image
Status in OpenObject Server:
Fix Released
Status in OpenObject Server 5.0 series:
In Progress
Bug description:
I created a new report through the report designer and uploaded it into my project. when I want to run it I receive the following error:
Traceback (most recent call last):
File "/opt/openerp-server/bin/service/web_services.py", line 682, in go
(result, format) = obj.create(cr, uid, ids, datas, context)
File "/opt/openerp-server/bin/report/report_sxw.py", line 364, in create
fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
File "/opt/openerp-server/bin/report/report_sxw.py", line 426, in create_source_pdf
return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
File "/opt/openerp-server/bin/report/report_sxw.py", line 447, in create_single_pdf
pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
File "/opt/openerp-server/bin/report/interface.py", line 183, in create_pdf
obj.render()
File "/opt/openerp-server/bin/report/render/render.py", line 50, in render
result = self._render()
File "/opt/openerp-server/bin/report/render/rml.py", line 41, in _render
return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
File "/opt/openerp-server/bin/report/render/rml2pdf/trml2pdf.py", line 790, in parseNode
r.render(fp)
File "/opt/openerp-server/bin/report/render/rml2pdf/trml2pdf.py", line 204, in render
pt_obj.render(el)
File "/opt/openerp-server/bin/report/render/rml2pdf/trml2pdf.py", line 784, in render
self.doc_tmpl.build(fis)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 877, in build
self.handle_flowable(flowables)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 762, in handle_flowable
if frame.add(f, canv, trySplit=self.allowSplitting):
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/frames.py", line 174, in _add
flowable.drawOn(canv, self._x + self._leftExtraIndent, y, _sW=aW-w)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py", line 106, in drawOn
self._drawOn(canvas)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py", line 87, in _drawOn
self.draw()#this is the bit you overload
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py", line 1272, in draw
self._drawCell(cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight))
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/tables.py", line 1378, in _drawCell
v.drawOn(self.canv,x,y)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py", line 106, in drawOn
self._drawOn(canvas)
File "/usr/lib/python2.6/dist-packages/reportlab/platypus/flowables.py", line 87, in _drawOn
self.draw()#this is the bit you overload
File "/opt/openerp-server/bin/report/render/rml2pdf/trml2pdf.py", line 561, in draw
drw.render(self.canv, None)
File "/opt/openerp-server/bin/report/render/rml2pdf/trml2pdf.py", line 447, in render
cnv.render(self.node)
File "/opt/openerp-server/bin/report/render/rml2pdf/trml2pdf.py", line 432, in render
tags[n.tag](n)
File "/opt/openerp-server/bin/report/render/rml2pdf/trml2pdf.py", line 364, in _image
u = file(os.path.join(self.path,str(node.get('file'))), 'rb')
IOError: [Errno 2] No such file or directory: '/usr/lib/openerp-server/1000020000000047000000523098EFC7.png'
But when I reopen the report for modification within the report designer the picture is still available.
The current version running is OpenERP 5.0.10. For sure this did not happen in 5.0.7 but unfortunately I can't make a statement about 5.0.8 and 5.0.9 as no new reports have been created inbetween.