Hello Community,
I am using odoo 14 and i want to sort hours(desc) withing datetime(desc).
i am using _order = 'start_datetime desc, unit_amount desc' by this date is work but hours not working desc within this datetime field.
My Code is:-
class AccountAnalyticLine(models.Model):
_inherit = 'account.analytic.line'
_order = 'start_datetime desc, unit_amount desc'
start_datetime = fields.Datetime("Start Time", required=True)
unit_amount = fields.Float('Duration', default=0.0)
Thanks in advance.