From 134db4ce99eee3273cb57cc585ad1508b6fe95f5 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 6 Feb 2017 17:13:27 +0100 Subject: [PATCH] [FIX] web: change selected field value on chain shortening Before this commit, when opening a field chain with a field selector and only removing parts of it, the field selector internal "chain" value was properly updated but not its "selectedField" value. --- addons/web/static/src/js/widgets/model_field_selector.js | 1 + 1 file changed, 1 insertion(+) 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 1310aa97ea7..8fa6c36b3be 100644 --- a/addons/web/static/src/js/widgets/model_field_selector.js +++ b/addons/web/static/src/js/widgets/model_field_selector.js @@ -240,6 +240,7 @@ var ModelFieldSelector = Widget.extend({ if (this.pages.length <= 1) return; this.pages.pop(); this.removeChainNode(); + this.selectedField = this._getLastPageField(_.last(this.chain.split("."))); this.displayPage("o_animate_slide_left"); }, /// The goToNextPage method adds a new page to the popover following the given field relation and adapts