Skip to Content
Menu
This question has been flagged
2291 Views

Hi,

How I can add 2 values in a RML report, I need do something like:

Account invoice report in table line get the result of  (amount_total - residual), I try lambda, but doesn't work, and I don't really understand how its works.

Thanks for help me.

<para style="terp_default_8">[[repeatIn(getLines(o), 'line') ]]</para>

<blockTable colWidths="80.0,100.0,100.0" style="Table3">

<tr>

<td>

<para style="terp_default_Centre_9">[[ formatLang(line['date_due'],date=True) or '' ]]</para>

</td>

<td>

<para style="terp_default_Right_9">[[ company.currency_id.symbol ]] [[ formatLang(line['amount_total']) ]] </para>

</td>

<td>

<para style="terp_default_Right_9">

[[ formatLang((reduce(lambda x, y: x['amount_total']) - (y['residual']), 0))) ]]

</para>

</td>

</tr>

</blockTable>

Avatar
Discard