Odoo Help


in rml report: when output function is null,i has error?

on 1/30/16, 1:18 AM 935 views

    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)


return self.cr.fetchall()


    <blockTable colWidths="181.0,216.0" style="Table36">



<para style="P8">[[ repeatIn(function(data['form']['fromDate'], data['form']['toDate']),'ol') ]]</para>

<para style="P9">[[ol[0] ]]</para>



<para style="P9">[[ol[1] ]]</para>




How do I fix this error code؟؟؟؟؟؟؟؟؟


Axel Mendoza

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 1/30/16, 6:42 AM

You need to check if you have something to return and if not then you could return an empty list to do the trick like:

return self.cr.fetchall() or []

thanks,but i has error: TypeError: cannot concatenate 'str' and 'tuple' objects please help me.....

on 1/30/16, 7:24 AM

It's a good practice to post all your error log to get helped

Axel Mendoza
on 1/30/16, 1:47 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/30/16, 1:18 AM
Seen: 935 times
Last updated: 1/30/16, 6:42 AM