Odoo Help


How to get minimum value from a record set of tree view in odoo 9.0?

arindam das
on 8/27/16, 3:10 AM 359 views

In this below image you can check i have created two class efficiency and test ,in efficiency class there is one field called start_time so i need this field to display   the minimum value of all record in start field ,which is present in test class.for this i am writing one  function can anyone help,how i should get minimum value of start field and displayed into my start_time field which is present in another model.


Are You want to choose the minimum 'test.line' record for the relational field "start_time"

yousif Mobark
on 8/29/16, 2:42 AM
On 9/8/16, 4:42 AM

As an option:

get the lowest amount of 'start' - test . search([],order='start asc', limit=1)

define 'start_time' as float and make it equal to the result above or as integer and store 'id' of the record with min 'start' amount.

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 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

1 follower(s)


Asked: 8/27/16, 3:10 AM
Seen: 359 times
Last updated: 9/8/16, 4:42 AM