Odoo Help


This community 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.


Rml reports

on 7/8/15, 10:46 AM 442 views

Hello. I want to modify existing rml template from addons/hr_timesheet_invoice/report/account_analytic_profit.rml

But I have some troubles with following piece of code

[[ reduce(lambda x, y: x+y['unit_amount'], line(data['form'], data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]]

I can't understand what line function do. Can someone explain it to me?


Axel Mendoza

--Axel Mendoza--
| 6 7 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 an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 7/10/15, 2:28 AM

To find every function that you see in an RML report file you need to seek to the correspondig RML Parser .py. In this case there is at:


This parser have the function _line made it usable by the RML engine because it's in the report localcontext as 'line'. Just open the source code of this file and read what that function do

On 7/9/15, 5:43 PM


are you using Odoo V8? If the answer is yes then you are out of luck, because RML reports are deprecated and on the latest updates of Odoo V8 were not suported anymore. This means RML could suffer from various errors, even if the architecture of your code is right. Better bet on Qweb report for now on. 

(the -1 was not mine :P)

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 7/8/15, 10:46 AM
Seen: 442 times
Last updated: 7/10/15, 3:59 AM