Lambda is the python function and you can use eeasily all the python function in the RML.

but if you need to count the no of lines of the invoice then you can pass one method which is called from the RML and revert the answer form the report's py file

i.e.

[[repeatIn(o.move_lines,'line')]] this is your rml loop for the invoice line. now you just need to call one method in the loop so it will count the and revert from the py side to rml and you will have your desired output

thanks for your answer, but i directly create a function in python and call it in my rml report like this,
def _sum_qty(self):
total = 0
for line in picking.move_lines:
total+=line.product_qty
str(total)
print total
return total

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