From e3ceba18c4b006e05413f7e187ca9a090eebaf33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 26 Apr 2019 12:04:10 +0200 Subject: [PATCH] Allow all models for reference if there is no restriction If the allowed models is empty, it means that there is no constraint on the reference model. So we must allow all of them. issue8300 review275311002 --- tryton/common/selection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/common/selection.py b/tryton/common/selection.py index 495005010d..902f646f55 100644 --- a/tryton/common/selection.py +++ b/tryton/common/selection.py @@ -93,7 +93,7 @@ class SelectionMixin(object): def _model_evaluator(allowed_models): def test(value): - return value[0] in allowed_models + return value[0] in allowed_models or not allowed_models return test if field.attrs['type'] == 'reference':