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.


How to sort a list of records in a mako file ?

on 12/30/13, 10:21 AM 948 views

Can anyone knows how to sort a list in mako file for a webkit report?


Atul Arvind

--Atul Arvind--
| 3 3 5
--Atul Arvind--


I am odoo Enthusiast/Consultant from Baroda, Gujarat, India. Working with odoo from v5 to v9 and other opensource technology since 4+ years. Having Strong Expertise in

Requirement gathering & Gap Analysis

Odoo Development

Odoo Customization

Odoo Training

Odoo Integration

Server Administration

Odoo Migration


I am also active on StackOverflow.


Atul Arvind
On 1/1/14, 2:35 PM

Webkit report supports Python code, to use the python code in the mako template you can use,

#Python code

Here you can write your python code to sort the data!

On 1/1/14, 1:26 PM

Hi Surendar,

In mako template you can open python code block like this:

      # You can sort your list of records here

I hope this helps :-) Cheers, Petar

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

0 follower(s)


Asked: 12/30/13, 10:21 AM
Seen: 948 times
Last updated: 3/16/15, 8:10 AM