From b3740bc5ce3981cf27b3add91ef231840877839c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leloup=20Lo=C3=AFc=20=28lole=29?= Date: Fri, 28 Jul 2023 08:53:59 +0000 Subject: [PATCH] [FIX] mail : fix activitycell date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When on helpdesk app (or any app with an activity view), if you go on the activity view while having activities due on a previous year it will cause a traceback "TypeError: date.toLocaleDateString is not a function" This happens because the function tries to call toLocaleDateString on a datetime variable, not a date one. opw-3432005 closes odoo/odoo#130090 X-original-commit: 81ec723b3956f198d5de99a5a4214359f67b8327 Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/views/web/activity/activity_cell.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/views/web/activity/activity_cell.js b/addons/mail/static/src/views/web/activity/activity_cell.js index 99e7ca4a0ae..832d033348b 100644 --- a/addons/mail/static/src/views/web/activity/activity_cell.js +++ b/addons/mail/static/src/views/web/activity/activity_cell.js @@ -34,7 +34,7 @@ export class ActivityCell extends Component { month: "short", }); } else { - return date.toLocaleDateString({ + return date.toLocaleString({ day: "numeric", month: "short", year: "numeric",