summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-02-09 17:42:37 +0100
committerDenis Ledoux <dle@odoo.com>2015-02-09 17:53:11 +0100
commit1d76586a1b0fff766581871cd277332bbfec030a (patch)
treeea3904b7228384b0e4dd3976a7a9eb3b4063e7ed /addons/web/static
parent318f2547617d8c8b746cf21810d6f21e19ae487f (diff)
[FIX] web: context lang & active* in action buttons
This reverts rev. 9f9e7ef0e1ca1d2f5fc5e0a166499c95359dbbf3 As explained in 9f9e7ef0e1ca1d2f5fc5e0a166499c95359dbbf3, if a field "lang" is present in the view, clicking in any action item in the more menu leaded for the action title to be translated in the lang value of the form, such as in the partner form. 9f9e7ef0e1ca1d2f5fc5e0a166499c95359dbbf3 fixed the issue, but has as side-effect to not update correctly the active* keys. So, if "active_id" was used in the context of the action button, and the active_id was set in the dataset context, for example because you come from another form, trough another action button (For instance, Customers > Opportunities > Logged Calls), the active_id was not updated with the current id of the record. opw-620293 opw-617321 fixes #3462
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/js/view_form.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index d4cf85a59f2..201f472b800 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -1165,7 +1165,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
},
build_eval_context: function() {
var a_dataset = this.dataset;
- return new instance.web.CompoundContext(this._build_view_fields_values(), a_dataset.get_context());
+ return new instance.web.CompoundContext(a_dataset.get_context(), this._build_view_fields_values());
},
});