← Back to team overview

openerp-india team mailing list archive

[Bug 1077235] Re: 7.0 report_webkit - crashes

 

Hi,

I also marked this error but now i found why:

in the report.xml record i had this:
        <report auto="False"
                id="report_webkit_contract"
                model="workforce.contract"
                name="webkit.contract"
                file="report/webkit_contract_html.mako"
                string="Contract Sheet"
                report_type="webkit"
                webkit_header="report_webkit.ir_header_webkit_basesample0"/>

You have to put the module name in the path so that the webkit finds the
file:

        <report 
                ....
                file="workforce/report/webkit_contract_html.mako"
                ...
                 />

Diogo Duarte

** Changed in: openobject-addons
       Status: New => Invalid

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1077235

Title:
  7.0 report_webkit - crashes

Status in OpenERP Addons (modules):
  Invalid

Bug description:
  
  path = addons.get_module_resource(report_xml.report_file)
  path is always False

  2012-11-09 22:52:11,377 25765 INFO ? werkzeug: 127.0.0.1 - - [09/Nov/2012 22:52:11] "POST /web/session/eval_domain_and_context HTTP/1.1" 200 -
  2012-11-09 22:52:11,568 25765 ERROR ? openerp.service.web_services: Exception: coercing to Unicode: need string or buffer, bool found
  Traceback (most recent call last):
    File "/home/gass/OpenERP/7.0/server/openerp/service/web_services.py", line 725, in go
      (result, format) = obj.create(cr, uid, ids, datas, context)
    File "/home/gass/OpenERP/7.0/server/openerp/addons/report_webkit/webkit_report.py", line 336, in create
      result = self.create_source_pdf(cursor, uid, ids, data, report_xml, context)
    File "/home/gass/OpenERP/7.0/server/openerp/report/report_sxw.py", line 511, in create_source_pdf
      return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
    File "/home/gass/OpenERP/7.0/server/openerp/addons/report_webkit/webkit_report.py", line 224, in create_single_pdf
      if os.path.exists(path) :
    File "/usr/lib/python2.7/genericpath.py", line 18, in exists
      os.stat(path)
  TypeError: coercing to Unicode: need string or buffer, bool found
  2012-11-09 22:52:11,781 25765 ERROR None openerp.netsvc: coercing to Unicode: need string or buffer, bool found
  (<type 'exceptions.TypeError'>, TypeError('coercing to Unicode: need string or buffer, bool found',), <traceback object at 0x7fb0e461ef80>)
  Traceback (most recent call last):
    File "/home/gass/OpenERP/7.0/server/openerp/netsvc.py", line 361, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/home/gass/OpenERP/7.0/server/openerp/service/web_services.py", line 668, in dispatch
      res = fn(db, uid, *params)
    File "/home/gass/OpenERP/7.0/server/openerp/service/web_services.py", line 773, in exp_report_get
      return self._check_report(report_id)
    File "/home/gass/OpenERP/7.0/server/openerp/service/web_services.py", line 751, in _check_report
      netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
    File "/home/gass/OpenERP/7.0/server/openerp/netsvc.py", line 67, in abort_response
      raise openerp.osv.osv.except_osv(description, details)
  except_osv: (u'coercing to Unicode: need string or buffer, bool found', (<type 'exceptions.TypeError'>, TypeError('coercing to Unicode: need string or buffer, bool found',), <traceback object at 0x7fb0e461ef80>))
  2012-11-09 22:52:11,785 25765 INFO None werkzeug: 127.0.0.1 - - [09/Nov/2012 22:52:11] "POST /web/report HTTP/1.1" 500 -

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1077235/+subscriptions


References