summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-02-26 20:46:53 +0100
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commit086a04fdec39f8ba0eb86180795c43c5d5ea949c (patch)
tree6c6ca41c7c9d3c7c51372e22bfe251ab243de2bd /addons/web/static/src
parentecceee639ed7bfdaf0e2e152fd147ee02e3281e2 (diff)
[FIX] web: avoid calling getContext twice
Also, slightly improve the style...
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/field_manager_mixin.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/field_manager_mixin.js b/addons/web/static/src/js/views/field_manager_mixin.js
index e2cfa681116..f110f9be8bf 100644
--- a/addons/web/static/src/js/views/field_manager_mixin.js
+++ b/addons/web/static/src/js/views/field_manager_mixin.js
@@ -137,7 +137,9 @@ var FieldManagerMixin = {
* appropriate context with the route arguments' one.
*/
_onCallService: function (e) {
- if (e.data.service !== "ajax" || e.data.method !== "rpc") return;
+ if (e.data.service !== "ajax" || e.data.method !== "rpc") {
+ return;
+ }
var args = e.data.args[1];
var options = e.data.args[2];
@@ -148,6 +150,8 @@ var FieldManagerMixin = {
}),
args.kwargs.context || {}
);
+ // to prevent doing this work again, in some other widget with FMM.
+ delete options.dataPointID;
}
},
};