Odoo Help


Filter on the tree view to display single record of each user.

on 8/27/14, 9:32 AM 1,020 views

In the tree view , i wann to display only one latest record from each user . Currently is displays all the records created by default , now i have added a group filter by month , it shows all the records of the month , but not single record of each user .

How to achieve this .

This is difficult to achieve using group by, you will have to do something similar to what Odoo does in Reporting.

odoo.ma by IBS Group
on 8/27/14, 4:15 PM

can u gv more info on that.

on 8/29/14, 2:16 AM

Check this file: addons/point_of_sale/report/pos_order_report.py as well as its views.

odoo.ma by IBS Group
on 8/30/14, 8:15 AM

Techno-Functional Associate with 7+ years of experience in Odoo (formerly known as OpenERP).

On 8/28/14, 1:36 AM


In Tree view you have an option to display in records in Bold which are not read "bold:message_unread==True"...

so same thing can be used to set Current filter in the search view ...

Hi , I did something like this in tree view ,but nothing changes . sicon_client_details_tree sicon_client_details

on 8/29/14, 2:14 AM

Thanks for the idea , jus did some work around nd am getting the result .

on 8/29/14, 1:38 PM
Ben Olsen
On 8/27/14, 4:20 PM

Sounds like you need a new model with two fields:
user_id: many2one to res.users

latest_record: functional field related to the model you want

In the function code for the functional field, you can return the record ID of the latest record for the relational model, based on whatever logic you want to put in there. You could then create a normal tree view for this new model, and it should effectively give you what you want.

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

2 follower(s)


Asked: 8/27/14, 9:32 AM
Seen: 1020 times
Last updated: 3/16/15, 8:10 AM