This question has been flagged
7 Replies
5524 Views

Hello,

I am getting the following error when I try to print a report

NotImplementedError: Unknown report type: webkit

except_orm: (u'Unknown report type: webkit', (<type 'exceptions.NotImplementedError'>, NotImplementedError(u'Unknown report type: webkit',), <traceback object at 0x7f58480400e0>))

I was able to print reports before, and the webkit modules are there. 

I have no idea where to start looking to find a solution so any tip will be appreciated.

Thanks!

Avatar
Discard

Possible causes: report_webkit is not installed or there is another reporting engine module that does not play nice with report_webkit. If you can print *this* (emphasis intended) report before, then you might want to check what have changed in the environment (especially module installed or uninstalled) from then to now.

Author

Hello Ivan, do you know if there is another module which uses wbekit reports so I can test if it is my code or something else? I even tried installing previous version of my module where it was working and not it doesn't. It looks like it might be something with the system, but I can't find anything. Thanks again

There is a report_webkit_sample module in the past addons-extra that was developed by the same partner: https://code.launchpad.net/~openerp-community/openerp-extra/7.0-report_webkit_sample. The reports from this module should work out of the box.

Author

Thanks, so far I couldn't install it on v8, it is complaining module wizard is not there,wonder why that is. I will check again in the morning as it is almost 2am here and its been a long day. Thanks a lot for all your help.

For odoo 8 I found this note on addons\report_webkit\webkit_report.py # We use a jinja2 sandboxed environment to render mako templates. # Note that the rendering does not cover all the mako syntax, in particular # arbitrary Python statements are not accepted, and not all expressions are # allowed: only "public" attributes (not starting with '_') of objects may # be accessed. # This is done on purpose: it prevents incidental or malicious execution of # Python code that may break the security of the server. so check if your code follows the above rules,

Author

Thanks a lot, I will try that! this is getting really frustrating :(

Best Answer

See also this discussion:


https://github.com/odoo/odoo/issues/2334

Avatar
Discard