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.
If I put the if statement within a single line output this works
correctly:

<if test="len(invoice.taxes)>0">
  Invoices Taxes count: <len(invoice.taxes)>
</if>

-- 
[email protected] mailing list

Reply via email to