Odoo Help

0

0
1 Answer
0
Avatar

Niyas Raphy India

--Niyas Raphy--
27501
| 7 7 11
Wayanad, Kerala, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123
Whatsapp : +917736136763
Happy to help :)

Niyas Raphy India
10/9/19, 12:19 PM

Hi,

I have done something like this in python and it worked 

sale_rec = sale_rec.sorted(key=lambda sale: (sale.state == 'sale' and 2) or (sale.state == 'draft' and 1)  or 0)

The above code in python will sort the records as confirmed sale orders as first and then the quotations. I haven't tested the same yet inside the qweb, have a try and see.


Thanks

Ask a Question
Writer
5178
Usman
Tags
Keep Informed
1 follower(s)
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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now