diff --git a/sao/src/common.js b/sao/src/common.js index 732191b3ed..50d31383d4 100644 --- a/sao/src/common.js +++ b/sao/src/common.js @@ -848,9 +848,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; } @@ -878,7 +878,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 e900636781..0988e7fced 100644 --- a/tryton/tryton/common/selection.py +++ b/tryton/tryton/common/selection.py @@ -65,7 +65,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 @@ -88,7 +89,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: