correct syntax for odt template?

correct syntax for odt template?

Postby jluitz » Mon Jan 13, 2014 4:43 pm

Dear all,

when using template-mime type "generic" the following code works like charm:
Code: Select all
{% for o in objects %}\
BOM
***********************
${o.product_qty}   [${o.code}]   ${o.name}
***********************

{% with item = search('mrp.bom',[('bom_id','=',o.id)]) %}\
{% for i in item %}\
${i.product_qty}   [${i.product_id.default_code}]   ${i.product_id.name_template}
{% end %}\
{% end %}\
{% end %}


Trying to do the same in ODT or ODS hopelessly fails returning
Code: Select all
TypeError: coercing to Unicode: need string or buffer, tuple found

The problem seems to lie in the WITH statement.

What would be the correct syntax for the WITH statement in ODS/ODT to achieve the same result?

Thanks for your help
J
jluitz
 
Posts: 2
Joined: Sun Feb 10, 2013 11:10 pm

Return to Aeroo Reports & OpenOffice.org Reporting Engine

cron
Copyright © 2001 Alistek Ltd., ALL RIGHTS RESERVED