summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2019-11-12 17:18:46 +0000
committerfw-bot <otis@odoo.com>2019-11-15 11:11:49 +0000
commitdfc92c66a67fee0bdcbe29d98beca453a8f0349a (patch)
tree2672757c260a4aa174fad5a0d1d2188589c06212 /addons/web/static/src/js/views/basic/basic_controller.js
parentabc80eff18a58d2a4bfe91e5f0c51d08d31d0d79 (diff)
[FIX] web: week view ok if week start not sunday/monday
Currently, if the first week day was Saturday the calendar week view would possibly get the wrong week. This is because current heuristic would get date of current week from 6 (Saturday) to 12 (Sunday). Thus if we were: - on Friday 14th, we would have a week day ranges: 15-21 (wrong) - on Saturday 15th, we would have a week day ranges: 15-21 (ok) - on Sunday 16th, we would have a week day ranges: 22-28 (wrong) So it would only get the right range when getting range from saturday. If a week: - start on monday, the week range would only be wrong on sunday. - start on sunday, the week range would always be alright. Added test without the fix fail: - CalendarView: Saturday week start week mode The domain to search events in should be correct (domain range 14-20 instead of correct 07-13 whilst the day was 12th) - CalendarView: Monday week start week mode The domain to search events in should be correct (domain range 16-22 instead of correct 09-15 whilst the day was 15th) opw-2091448 closes #40244 closes odoo/odoo#40327 X-original-commit: 6c3d74846581d6c1bfc0c6e3a7104440515ddbc5 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions