[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.
This commit is contained in:
qsm-odoo
2017-02-13 14:55:18 +01:00
parent d3703ecb4c
commit 134db4ce99
@@ -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