diff --git a/sao/src/common.js b/sao/src/common.js index 0ba193fce1..41c84c40ec 100644 --- a/sao/src/common.js +++ b/sao/src/common.js @@ -822,9 +822,9 @@ var context = field.get_context(record); var jdomain = JSON.stringify([domain, context]); if (jdomain in this._domain_cache) { - let selection = this._domain_cache[jdomain]; + let [selection, help] = this._domain_cache[jdomain]; if (callback) { - callback(selection, {}); + callback(selection, help); } return; } @@ -852,7 +852,7 @@ help[x.id] = x[help_field]; } } - this._domain_cache[jdomain] = selection; + this._domain_cache[jdomain] = [selection, help]; let cur_domain = field.get_domain(record); let cur_context = field.get_context(record); diff --git a/tryton/tryton/common/selection.py b/tryton/tryton/common/selection.py index 68d1aae298..3c49ca2612 100644 --- a/tryton/tryton/common/selection.py +++ b/tryton/tryton/common/selection.py @@ -62,7 +62,8 @@ class SelectionMixin(object): context = field.get_context(record) domain_cache_key = (freeze_value(domain), freeze_value(context)) if domain_cache_key in self._domain_cache: - self.selection = self._domain_cache[domain_cache_key] + self.selection, self.help = ( + self._domain_cache[domain_cache_key]) self._last_domain = (domain, context) if (domain, context) == self._last_domain: return @@ -85,7 +86,7 @@ class SelectionMixin(object): else: help_ = {} self._last_domain = (domain, context) - self._domain_cache[domain_cache_key] = selection + self._domain_cache[domain_cache_key] = (selection, help_) else: selection = [] if self.nullable_widget: