Community mailing list archives

community@mail.odoo.com

Re[2]: Report Building in V8

by
Pyatak
- 10/07/2014 00:10:16
Dear Budi Iskandar,

They change from mako template to jinja2 template.
You have to edit your template that correspond to jinja2 rules: http://jinja.pocoo.org/docs/dev/templates/

Thanks and Best Regards!
Petr Kotov
CodUP
http://codup.com


Вторник, 7 октября 2014, 1:52 UTC от Budi Iskandar <budiiskandar11@gmail.com>:
Dear Ferdinand,

this is mostly bugs that i found,

Traceback (most recent call last):
  File "/Users/budiiskandar11/OpenObject/Odoo_Server/odoo_8/openerp/service/report.py", line 93, in go
    result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
  File "/Users/budiiskandar11/OpenObject/Odoo_Server/odoo_8/openerp/report/__init__.py", line 40, in render_report
    return registry['ir.actions.report.xml'].render_report(cr, uid, ids, name, data, context)
  File "/Users/budiiskandar11/OpenObject/Odoo_Server/odoo_8/openerp/api.py", line 235, in wrapper
    return old_api(self, *args, **kwargs)
  File "/Users/budiiskandar11/Library/Application Support/Odoo/addons/8.0/base/ir/ir_actions.py", line 150, in render_report
    return new_report.create(cr, uid, res_ids, data, context)
  File "/Users/budiiskandar11/Library/Application Support/Odoo/addons/8.0/report_webkit/webkit_report.py", line 373, in create
    result = self.create_source_pdf(cursor, uid, ids, data, report_xml, context)
  File "/Users/budiiskandar11/OpenObject/Odoo_Server/odoo_8/openerp/report/report_sxw.py", line 461, in create_source_pdf
    return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
  File "/Users/budiiskandar11/Library/Application Support/Odoo/addons/8.0/report_webkit/webkit_report.py", line 303, in create_single_pdf
    body_mako_tpl = mako_template(template)
  File "/Users/budiiskandar11/Library/Application Support/Odoo/addons/8.0/report_webkit/webkit_report.py", line 88, in mako_template
    return mako_template_env.from_string(text)
  File "/Library/Python/2.7/site-packages/Jinja2-2.7.2-py2.7.egg/jinja2/environment.py", line 841, in from_string
    return cls.from_code(self, self.compile(source), globals, None)
  File "/Library/Python/2.7/site-packages/Jinja2-2.7.2-py2.7.egg/jinja2/environment.py", line 554, in compile
    self.handle_exception(exc_info, source_hint=source)
  File "/Library/Python/2.7/site-packages/Jinja2-2.7.2-py2.7.egg/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "<unknown>", line 124, in template
TemplateSyntaxError: expected token ',', got 'for'

and the error came from this mako script :

…..
%endif
</td>
</tr>
%endfor
${blank_line(16,nourut([line for line in o.order_line], l)) or ''}
<tr>
<td colspan="2" valign="top">
<table width="100%" cellpadding="5px">
<tr valign="top">
…...


if I remove the red-colored line, it works properly. Seems that the new webkit report engine don't recognise a single line such as that.

I'm a newbie for openerp technical and webkit is very powerful for me, if Odoo will drop this support, then it's really bad.


Best regards,
Budi Iskandar

Databit - Odoo Partner



On Oct 7, 2014, at 2:26 AM, Ferdinand Gassauer <ferdinand.gassauer@camptocamp.com> wrote:

On 2014-10-06 18:59, Zakaria Makrelouf wrote:

please check if wkhtml is supported in v9 - odoo plans to drop the support - use qweb instead (if you are on v8)

<blockquote cite="mid:CAN5bpOF4hH0BYMH8iE5gPEamG8HjFZVULtV6=1TH685kFoXgHA@mail.gmail.com" type="cite">

You have the wkhtml reporting engine and it is pretty cool

On Monday, October 6, 2014, John Pia Jr <jpiajr@southmill.com> wrote:

What would everyone suggest as the best means of report building in V8?

Ideally I'd like to be able to use HTML/CSS to build a report template, and have wkhtmltopdf pick it up and generate a PDF based on the report.

What is the best means of building reports using HTML/CSS

​ Thanks in advanced.​

--
John Pia Jr
South Mill Mushroom Sales Inc. | Kaolin Mushroom Farms Inc.
Office: (610) 444-4800 [x242] | Mobile: (610) 470-5163 | South Mill Online!

  
   

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe



--
Best Regards,
Zakaria Makrelouf


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


Many Thanks and Best Regards,







Budi Iskandar


Mobile : 087874808309







Many Thanks and Best Regards, 

Budi Iskandar
OpenERP Consultant

P : 087874808309





_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe



--