From 8a459f1859c8eda10e2cb1de72fd32ce29c53365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Lef=C3=A8vre=20=28lul=29?= Date: Mon, 8 Jan 2024 13:33:41 +0000 Subject: [PATCH] [FIX] web: support False for selection in domain selector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The original issue (in saas-16.4) has been fixed in 17.0 by refactorings. This commit only fw-ports the test Steps to reproduce: - Open the Subscription app - click on the list cog wheel - Spreadsheet > Insert list in spreadsheet - Select the blank spreadsheet and insert the list - right click any cell with a list function - click on "See list properties" => boom `undefined is not iterable (cannot read property Symbol(Symbol.iterator))` The list domain has the shape `["subscription_state", "not in", ["2_renewal", "5_renewed", false]]` `false` makes the domain selector crash. opw 3670344 closes odoo/odoo#148727 X-original-commit: cfdc9c6d62050e3aac4bf18f374e4772ce18a504 Signed-off-by: Mathieu Duckerts-Antoine (dam) Signed-off-by: Lucas Lefèvre (lul) --- addons/web/static/tests/core/domain_selector_tests.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/tests/core/domain_selector_tests.js b/addons/web/static/tests/core/domain_selector_tests.js index 342a652133e..ae7c54476fd 100644 --- a/addons/web/static/tests/core/domain_selector_tests.js +++ b/addons/web/static/tests/core/domain_selector_tests.js @@ -1579,6 +1579,7 @@ QUnit.module("Components", (hooks) => { { domain: `[("state", "=", expr)]`, text: `State = expr` }, { domain: `[("state", "!=", "abc")]`, text: `State != ABC` }, { domain: `[("state", "in", ["abc", "def"])]`, text: `State is in ( ABC , DEF )` }, + { domain: `[("state", "in", ["abc", False])]`, text: `State is in ( "ABC" , false )` }, { domain: `[("state", "not in", ["abc", "def"])]`, text: `State is not in ( ABC , DEF )`,