def _function(self, fromDate, toDate):
sql = "select * from \
(select (sum(aml.credit)-sum(aml.debit)) as s,rp.name \
from account_move_line as aml \
join res_partner as rp on aml.partner_id=rp.id \
where aml.account_id=200 and aml.date BETWEEN \'%s\' AND \'%s\' \
group by rp.name order by s desc) as f " %(fromDate, toDate)
self.cr.execute(sql)
return self.cr.fetchall()
report.rml:
<blockTable colWidths="181.0,216.0" style="Table36">
<tr>
<td>
<para style="P8">[[ repeatIn(function(data['form']['fromDate'], data['form']['toDate']),'ol') ]]</para>
<para style="P9">[[ol[0] ]]</para>
</td>
<td>
<para style="P9">[[ol[1] ]]</para>
</td>
</tr>
</blockTable>
How do I fix this error code؟؟؟؟؟؟؟؟؟