diff options
| author | Swapnesh Shah <swapneshshah111@gmail.com> | 2020-03-16 16:29:03 +0000 |
|---|---|---|
| committer | Swapnesh Shah <swapneshshah111@gmail.com> | 2020-03-17 14:34:09 +0000 |
| commit | 11171842d07473d23bad3d9f3b04516edcde6aa5 (patch) | |
| tree | 0a64f87689437e32413d91450e48b9534e96e2b6 /addons | |
| parent | 32fcc1b883008ea16e5f5b83a6c10fd18d09e576 (diff) | |
[FIX] stock: Display date in user's timezone and lang format
Fixes #33309
Before this commit, Traceability report displays raw datetime.
This commits consider User's TZ + Datetime format configured in language.
closes odoo/odoo#47827
X-original-commit: 324db18dc9d5774d714c4b178468971b8bb36d6c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/stock/report/stock_traceability.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/stock/report/stock_traceability.py b/addons/stock/report/stock_traceability.py index 23b70b9ed43..dbc29ff0891 100644 --- a/addons/stock/report/stock_traceability.py +++ b/addons/stock/report/stock_traceability.py @@ -3,6 +3,7 @@ from odoo import api, models, _ from odoo.tools import config +from odoo.tools import format_datetime rec = 0 @@ -120,7 +121,7 @@ class MrpStockReport(models.TransientModel): data = [{ 'level': level, 'unfoldable': unfoldable, - 'date': move_line.move_id.date, + 'date': format_datetime(self.env, move_line.move_id.date, tz=False, dt_format=False), 'parent_id': parent_id, 'is_used': bool(is_used), 'usage': self._get_usage(move_line), |
