changeset 1b3c6557b7f9 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=1b3c6557b7f9
description:
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
diffstat:
tryton/common/selection.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 57e5d30f2b43 -r 1b3c6557b7f9 tryton/common/selection.py
--- a/tryton/common/selection.py Tue Apr 23 12:04:49 2019 +0200
+++ b/tryton/common/selection.py Fri Apr 26 12:04:10 2019 +0200
@@ -93,7 +93,7 @@
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':