Getting error: TemplateAssertionError: no filter named 'n' when printing report?



I am trying to print a report for a custom module I am building with Odoo, but when I try to print I get the following error:



File "/opt/odoo/openerp/service/report.py", line 93, in go
result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
File "/opt/odoo/openerp/report/__init__.py", line 40, in render_report
return registry['ir.actions.report.xml'].render_report(cr, uid, ids, name, data, context)
File "/opt/odoo/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/ir/ir_actions.py", line 155, in render_report
return new_report.create(cr, uid, res_ids, data, context)
File "/opt/odoo/addons/report_webkit/webkit_report.py", line 376, in create
result = self.create_source_pdf(cursor, uid, ids, data, report_xml, context)
File "/opt/odoo/openerp/report/report_sxw.py", line 461, in create_source_pdf
return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
File "/opt/odoo/addons/report_webkit/webkit_report.py", line 334, in create_single_pdf
head_mako_tpl = mako_template(header)
File "/opt/odoo/addons/report_webkit/webkit_report.py", line 88, in mako_template
return mako_template_env.from_string(text)
File "/usr/local/lib/python2.7/dist-packages/http://ift.tt/16mlE8B", line 769, in from_string
return cls.from_code(self, self.compile(source), globals, None)
File "/usr/local/lib/python2.7/dist-packages/http://ift.tt/16mlE8B", line 493, in compile
self.handle_exception(exc_info, source_hint=source)
File "<unknown>", line 24, in template
TemplateAssertionError: no filter named 'n'


I googled a lot and couldn't find any clue as to how to solve that issue.


I am using webkit reporting. Here is my .mako file.



<html>
<head>
<style type="text/css">

</style>
</head>
<body>
Testing
</body>
</html>


This is how I call the report from the .py file



report_sxw.report_sxw('report.hotel.webkit',
'hotel.webkit',
'addons/hotel_webkit/report/report_hotel.mako',
parser=report_webkit_html)


And finally the XML call



<report id="sim.report_sim_hotel"
name="hotel.webkit"
auto="False"
model="sim.resumen_wizard"
file="hotel_webkit/report/report_hotel.mako"
string="Hotel Report Test"
webkit_header="base_headers_webkit.base_reports_portrait_header"
report_type="webkit"/>


Any clue as to what does that error means and what else can I test to make the report work will be appreciated.


Thanks


No comments:

Post a Comment