Skip to content
Snippets Groups Projects
Commit 52e04dc3 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] stock: sort traceability report


Commit 324db18d introduced the date formatting on the
traceability report. A side effect is that the line sorting is done on
the formatted value, leading to lines not appearing in chronological
order.

We format the line after sorting.

opw-2243432

closes odoo/odoo#52474

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 4e14430a
Branches
Tags
No related merge requests found
......@@ -121,7 +121,7 @@ class MrpStockReport(models.TransientModel):
data = [{
'level': level,
'unfoldable': unfoldable,
'date': format_datetime(self.env, move_line.move_id.date, tz=False, dt_format=False),
'date': move_line.move_id.date,
'parent_id': parent_id,
'is_used': bool(is_used),
'usage': self._get_usage(move_line),
......@@ -156,7 +156,7 @@ class MrpStockReport(models.TransientModel):
'res_model': data.get('res_model', False),
'columns': [data.get('reference_id', False),
data.get('product_id', False),
data.get('date', False),
format_datetime(self.env, data.get('date', False), tz=False, dt_format=False),
data.get('lot_name', False),
data.get('location_source', False),
data.get('location_destination', False),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment