[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>
This commit is contained in:
Julien Mougenot
2020-07-14 10:55:59 +00:00
parent c547f12efb
commit 55408fd01b
@@ -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;
/**