Odoo Help

Welcome!

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.

0

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

By
mywebsitedeal
on 8/27/14, 9:32 AM 543 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.

IBS
on 8/27/14, 4:15 PM

can u gv more info on that.

mywebsitedeal
on 8/29/14, 2:16 AM

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

IBS
on 8/30/14, 8:15 AM
0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

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

deep
On 8/28/14, 1:36 AM

Hi..

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

mywebsitedeal
on 8/29/14, 2:14 AM

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

mywebsitedeal
on 8/29/14, 1:38 PM
0
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.

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)

Stats

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