Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
One option is to inherit the model in your python file and add _order to sort the date in desc or asc. Then the report will be with sorted dates.
_inherit = 'model.name'
_order = 'date desc'
Another option is to modify the getLines() to return the records sorted by date field. For example, if you are having a recordset at the end of the function, sort it by date and then return.
For eg: (if you are working with new api)
moveline_obj = self.env['account.move.line']
movelines = moveline_obj.browse([self.id])
recordset = movelines.sorted(key=lambda r: r.date)
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
|Asked: 10/27/15, 5:20 AM|
|Seen: 1449 times|
|Last updated: 10/27/15, 10:07 AM|