[FIX] Add to dashboard domain & context merging problems
bzr revid: fme@openerp.com-20120307160503-w1mha79xiznl4x6h
This commit is contained in:
parent
db24973abe
commit
c0439810ef
|
@ -1344,6 +1344,7 @@ class SearchView(View):
|
|||
ctx = common.nonliterals.CompoundContext(context_to_save)
|
||||
ctx.session = req.session
|
||||
ctx = ctx.evaluate()
|
||||
ctx['dashboard_merge_domains_contexts'] = False # TODO: replace this 6.1 workaround by attribute on <action/>
|
||||
domain = common.nonliterals.CompoundDomain(domain)
|
||||
domain.session = req.session
|
||||
domain = domain.evaluate()
|
||||
|
|
|
@ -145,13 +145,20 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
|
|||
action = result.result,
|
||||
view_mode = action_attrs.view_mode;
|
||||
|
||||
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);
|
||||
if (action_attrs.context && 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);
|
||||
}
|
||||
}
|
||||
|
||||
var action_orig = _.extend({ flags : {} }, action);
|
||||
|
||||
if (view_mode && view_mode != action.view_mode) {
|
||||
|
|
Loading…
Reference in New Issue