From ef9ecf1388928f9bd381268ce575691d39ddfaf4 Mon Sep 17 00:00:00 2001 From: Romeo Fragomeli Date: Wed, 27 Jan 2021 15:37:01 +0000 Subject: [PATCH] [IMP] web: allow to change the scale also when changing the date This commit allow to change the scale at the same time as changing the date. Task ID: 1891957 --- addons/web/static/src/js/views/calendar/calendar_controller.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web/static/src/js/views/calendar/calendar_controller.js b/addons/web/static/src/js/views/calendar/calendar_controller.js index e354902c131..43afd983fb3 100644 --- a/addons/web/static/src/js/views/calendar/calendar_controller.js +++ b/addons/web/static/src/js/views/calendar/calendar_controller.js @@ -236,6 +236,9 @@ var CalendarController = AbstractController.extend({ // When clicking on a random day of a random other week, switch to week view this.model.setScale('week'); } + if (event.data.scale) { + this.model.setScale(event.data.scale); + } this.model.setDate(event.data.date); this.reload(); },