On 03/12/09 16:30 -0800, Gunnar Thielebein wrote:
> I am just have the time to dive a little bit deeper into tryton.
> That'swhy I started with a hopefully small task - customize of the
> invoice.odt.
> What I tried was to remove the taxes field if there are no taxes
> entries.
> I put above the taxes fields a condition:
> 
> <if test="len(invoice.taxes)>0">
> 
> Together it now looks like this:
> 
> <if test="len(invoice.taxes)>0">
>   Tax
>   Base
>   Amount
>   <for each="tax in invoice.taxes">
>     <'[' + unicode(tax.sequence_number) + ']'> <tax.description or ''>
>     <formatLang(tax.base, invoice.party.lang,
> currency=invoice.currency)>
>     <formatLang(tax.amount, invoice.party.lang,
> currency=invoice.currency)>
>   </for>
> </if>
> 
> But this does not work. It shows no records also if the list returned
> has more than one entry.

I try it and it works. You must be careful about where you put the if
statement.


-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email: [email protected]
Jabber: [email protected]
Website: http://www.b2ck.com/
twitter: http://twitter.com/cedrickrier
identi.ca: http://identi.ca/cedrickrier

Attachment: pgpzGKUSM9ngW.pgp
Description: PGP signature

Reply via email to