changeset 8d8c1bd41b3e in tryton:4.6
details: https://hg.tryton.org/tryton?cmd=changeset;node=8d8c1bd41b3e
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
(grafted from 1b3c6557b7f9b37238b8d23fef20f843bfc8bd6b)
diffstat:
tryton/common/selection.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r a7d8959deff5 -r 8d8c1bd41b3e tryton/common/selection.py
--- a/tryton/common/selection.py Tue Apr 23 09:07:50 2019 +0200
+++ b/tryton/common/selection.py Fri Apr 26 12:04:10 2019 +0200
@@ -94,7 +94,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':