[FIX] add active_id, active_ids and active_model to context send when fetching m2o widget values in forms
lp bug: https://launchpad.net/bugs/878189 fixed bzr revid: xmo@openerp.com-20111115105809-phttoirkmq4rzd1w
This commit is contained in:
parent
1e38e13907
commit
f6b0482130
|
@ -798,8 +798,13 @@ openerp.web.form.Widget = openerp.web.Widget.extend(/** @lends openerp.web.form.
|
|||
_build_view_fields_values: function() {
|
||||
var a_dataset = this.view.dataset;
|
||||
var fields_values = this.view.get_fields_values();
|
||||
var parent_values = a_dataset.parent_view ? a_dataset.parent_view.get_fields_values() : {};
|
||||
fields_values.parent = parent_values;
|
||||
var active_id = a_dataset.ids[a_dataset.index];
|
||||
_.extend(fields_values, {
|
||||
active_id: active_id || false,
|
||||
active_ids: active_id ? [active_id] : [],
|
||||
active_model: a_dataset.model,
|
||||
parent: a_dataset.parent_view ? a_dataset.parent_view.get_fields_values() : {}
|
||||
});
|
||||
return fields_values;
|
||||
},
|
||||
_build_eval_context: function() {
|
||||
|
|
Loading…
Reference in New Issue