diff --git a/sao/src/common.js b/sao/src/common.js index 84f5cd3153..c614eb2687 100644 --- a/sao/src/common.js +++ b/sao/src/common.js @@ -2793,7 +2793,9 @@ (single_value && operator == 'in' && value.length == 1)) && (!count || ((count === 1) && model.length && name.endsWith('.id')))) { - value = operator == '=' ? value : value[0]; + if ((operator == 'in') && single_value) { + value = value[0]; + } if (model.length && name.endsWith('.id')) { model = model[0]; value = [model, value]; diff --git a/tryton/tryton/common/domain_inversion.py b/tryton/tryton/common/domain_inversion.py index efbf0735c0..97bc0a9015 100644 --- a/tryton/tryton/common/domain_inversion.py +++ b/tryton/tryton/common/domain_inversion.py @@ -433,7 +433,8 @@ def unique_value(domain, single_value=True): and operator == 'in' and len(value) == 1)) and (not count or (count == 1 and model and name.endswith('.id')))): - value = value if operator == '=' and single_value else value[0] + if operator == 'in' and single_value: + value = value[0] if model and name.endswith('.id'): model = model[0] value = [model, value]