Community mailing list archives

community@mail.odoo.com

Product barcode print - Print Report error - QWebException: "13,Permission denied" while evaluating

by
Fred Lu
- 01/15/2015 10:50:17
Hi,

On Product barcode print window,
"Print Report" output QWebException: "13 Permission denied" while evaluating error as following.

How to solve this problem?

Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openerp/addons/report/controllers/main.py", line 125, in report_download
    response = self.report_routes(reportname, converter='pdf', **dict(data))
  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 395, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/report/controllers/main.py", line 65, in report_routes
    pdf = report_obj.get_pdf(cr, uid, docids, reportname, data=options_data, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/report.py", line 186, in get_pdf
    html = self.get_html(cr, uid, ids, report_name, data=data, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/report.py", line 161, in get_html
    return particularreport_obj.render_html(cr, uid, ids, data=data, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/abstract_report.py", line 64, in render_html
    return self.pool['report'].render(cr, uid, [], self._template, docargs, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/report.py", line 147, in render
    return view_obj.render(cr, uid, template, values, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 1014, in render
    return self.pool[engine].render(cr, uid, id_or_xml_id, qcontext, loader=loader, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 253, in render
    return self.render_node(self.get_template(id_or_xml_id, qwebcontext), qwebcontext)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 294, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 294, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 294, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 294, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 292, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 416, in render_tag_foreach
    ru.append(self.render_element(element, template_attributes, generated_attributes, copy_qwebcontext))
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 292, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 416, in render_tag_foreach
    ru.append(self.render_element(element, template_attributes, generated_attributes, copy_qwebcontext))
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 294, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 274, in render_node
    self, element, attribute_name, attribute_value, qwebcontext)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 351, in render_att_att
    return [(attribute_name[6:], self.eval(attribute_value, qwebcontext))]
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 197, in eval
    raise_qweb_exception(message="Could not evaluate expression %r" % expr, expression=expr, template=template)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 194, in eval
    return qwebcontext.safe_eval(expr)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 80, in safe_eval
    return eval(expr, None, locals_dict, nocopy=True, locals_builtins=True)
  File "/usr/lib/python2.7/dist-packages/openerp/tools/safe_eval.py", line 313, in safe_eval
    return eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/openerp/addons/product_barcode_qweb/report/product_barcode_print.py", line 68, in _generateBarcode
    Code128().getImage(barcode_string, path="./").save(fp,"PNG")
  File "/usr/lib/python2.7/dist-packages/openerp/addons/product_barcode_qweb/report/Code128.py", line 233, in getImage
    decodeFontFile(courB08_pil ,path+"courB08.pil")
  File "/usr/lib/python2.7/dist-packages/openerp/addons/product_barcode_qweb/report/Code128.py", line 274, in decodeFontFile
    open (file, "wb").write(decompress(decodestring(data)))
QWebException: "13
Permission denied" while evaluating
"'data:image/png;base64,'+generateBarcode(label_data['default_code'])"

--
Best Regards,

Fred Lu