[FIX] web: support False for selection in domain selector

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) <dam@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
This commit is contained in:
Lucas Lefèvre (lul)
2024-01-10 10:28:16 +00:00
parent 62cbb20739
commit 8a459f1859
@@ -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 )`,