Synchronize trytond and tryton domain_inversion implementations

The commit d826376d08a5 was not correctly copied.
(grafted from 191f2e9503a1a2598810067689b7a14d67eef138)

--HG--
branch : 8.0
This commit is contained in:
Nicolas Évrard
2025-02-12 18:59:33 +01:00
parent abaf45e1f6
commit bb25bf89a6
+2 -1
View File
@@ -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]