[FIX] board: missed JS-ification of context and domains evaluations
various contexts and domains would remain unevaluated during the loading of board actions, leading to errors down the line bzr revid: xmo@openerp.com-20121207104933-p1fmog7ohljs9wfc
This commit is contained in:
parent
b471036979
commit
58e256093d
|
@ -176,18 +176,21 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
|||
action = result,
|
||||
view_mode = action_attrs.view_mode;
|
||||
|
||||
if (action_attrs.context && action_attrs.context['dashboard_merge_domains_contexts'] === false) {
|
||||
// evaluate action_attrs context and domain
|
||||
action_attrs.context = instance.web.pyeval.eval(
|
||||
'context', action_attrs.context || {});
|
||||
action_attrs.domain = instance.web.pyeval.eval(
|
||||
'domain', action_attrs.domain || [], action_attrs.context);
|
||||
if (action_attrs.context['dashboard_merge_domains_contexts'] === false) {
|
||||
// TODO: replace this 6.1 workaround by attribute on <action/>
|
||||
action.context = action_attrs.context || {};
|
||||
action.domain = action_attrs.domain || [];
|
||||
} else {
|
||||
if (action_attrs.context) {
|
||||
action.context = _.extend((action.context || {}), action_attrs.context);
|
||||
}
|
||||
if (action_attrs.domain) {
|
||||
action.domain = action.domain || [];
|
||||
action.domain.unshift.apply(action.domain, action_attrs.domain);
|
||||
}
|
||||
action.context = instance.web.pyeval.eval(
|
||||
'contexts', [action.context || {}, action_attrs.context]);
|
||||
action.domain = instance.web.pyeval.eval(
|
||||
'domains', [action_attrs.domain, action.domain || []],
|
||||
action.context)
|
||||
}
|
||||
|
||||
var action_orig = _.extend({ flags : {} }, action);
|
||||
|
|
Loading…
Reference in New Issue