From a80458570072bfda5439c771f3cbe22ed087d737 Mon Sep 17 00:00:00 2001 From: Mathieu Duckerts-Antoine Date: Tue, 19 Mar 2019 12:42:32 +0000 Subject: [PATCH] [FIX] web: correct quarter format in mockReadGroup Before this commit the value of a field (of date/datetime type) used as a groupby was not correctly formatted in the test environment when the granularity was 'quarter'. This commit fixes that situation. --- addons/web/static/tests/helpers/mock_server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/web/static/tests/helpers/mock_server.js b/addons/web/static/tests/helpers/mock_server.js index 44cc276e1c8..0f96b098bb8 100644 --- a/addons/web/static/tests/helpers/mock_server.js +++ b/addons/web/static/tests/helpers/mock_server.js @@ -877,6 +877,8 @@ var MockServer = Class.extend({ return moment(val).format('YYYY-MM-DD'); } else if (aggregateFunction === 'week') { return moment(val).format('ww YYYY'); + } else if (aggregateFunction === 'quarter') { + return 'Q' + moment(val).format('Q YYYY'); } else if (aggregateFunction === 'year') { return moment(val).format('Y'); } else {