summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/widgets')
-rw-r--r--addons/web/static/src/js/widgets/model_field_selector.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web/static/src/js/widgets/model_field_selector.js b/addons/web/static/src/js/widgets/model_field_selector.js
index ed74b2da44a..8f560be6d39 100644
--- a/addons/web/static/src/js/widgets/model_field_selector.js
+++ b/addons/web/static/src/js/widgets/model_field_selector.js
@@ -303,8 +303,12 @@ var ModelFieldSelector = Widget.extend({
function processChain(chain) {
var fieldName = chain.pop();
var field = this._getLastPageField(fieldName);
- if (field && field.relation && chain.length > 0) { // Fetch next chain node if any and possible
- return this._pushPageData(field.relation).then(processChain.bind(this, chain));
+ if (field && field.relation) {
+ if (chain.length) { // Fetch next chain node if any and possible
+ return this._pushPageData(field.relation).then(processChain.bind(this, chain));
+ } else { // Simply update the last popover page
+ return this._pushPageData(field.relation);
+ }
} else if (field && chain.length === 0) { // Last node fetched
return Promise.resolve();
} else if (!field && fieldName === "1") { // TRUE_LEAF