From 55408fd01ba51533694e9656f2d8759a2c696ed0 Mon Sep 17 00:00:00 2001 From: Julien Mougenot <jum@odoo.com> Date: Tue, 14 Jul 2020 09:42:33 +0000 Subject: [PATCH] [FIX] web: Properly handle default favorite filters Before this commit, the default active favorite filter was determined by its ID given by the control panel. These IDs start at index 0, meaning that if a condition checks for the value of such an ID, it could be false even though the ID and its filter exists. Now the indexation starts at 1 to avoid such problems. closes odoo/odoo#54435 X-original-commit: cfb7bbea1b428a062ee08ca045509d189b1fd1d4 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> --- addons/web/static/src/js/control_panel/control_panel_model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/control_panel/control_panel_model.js b/addons/web/static/src/js/control_panel/control_panel_model.js index 438ff98cd3ad..d438e5175cb5 100644 --- a/addons/web/static/src/js/control_panel/control_panel_model.js +++ b/addons/web/static/src/js/control_panel/control_panel_model.js @@ -13,8 +13,8 @@ odoo.define('web.ControlPanelModel', function (require) { const FAVORITE_PRIVATE_GROUP = 1; const FAVORITE_SHARED_GROUP = 2; - let filterId = 0; - let groupId = 0; + let filterId = 1; + let groupId = 1; let groupNumber = 0; /** -- GitLab