changeset 248923496f76 in sao:4.8
details: https://hg.tryton.org/sao?cmd=changeset;node=248923496f76
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 d32a1b5e5be16d0a3ef17d3c28e572e071189188)
diffstat:

 src/common.js |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r f9b4d12bb745 -r 248923496f76 src/common.js
--- a/src/common.js     Wed Apr 24 23:45:06 2019 +0200
+++ b/src/common.js     Fri Apr 26 12:04:10 2019 +0200
@@ -712,7 +712,8 @@
 
         var _model_evaluator = function(allowed_models) {
             return function(value) {
-                return ~allowed_models.indexOf(value[0]);
+                return ~allowed_models.indexOf(value[0]) ||
+                    jQuery.isEmptyObject(allowed_models);
             };
         };
 

Reply via email to