[fix] (x-files mode on) problem with some reports that are not reports (x-files mode off)
bzr revid: nicolas.vanhoren@openerp.com-20110907132320-uf2e5a6crjg04r84
This commit is contained in:
parent
3b1627b7a4
commit
b4694f6a91
|
@ -1060,8 +1060,11 @@ class Action(openerpweb.Controller):
|
||||||
context = req.session.eval_context(req.context)
|
context = req.session.eval_context(req.context)
|
||||||
action_type = Actions.read([action_id], ['type'], context)
|
action_type = Actions.read([action_id], ['type'], context)
|
||||||
if action_type:
|
if action_type:
|
||||||
action = req.session.model(action_type[0]['type']).read([action_id], False,
|
ctx = {}
|
||||||
context)
|
if action_type[0]['type'] == 'ir.actions.report.xml':
|
||||||
|
ctx.update({'bin_size': True})
|
||||||
|
ctx.update(context)
|
||||||
|
action = req.session.model(action_type[0]['type']).read([action_id], False, ctx)
|
||||||
if action:
|
if action:
|
||||||
value = clean_action(req, action[0])
|
value = clean_action(req, action[0])
|
||||||
return {'result': value}
|
return {'result': value}
|
||||||
|
|
|
@ -454,7 +454,7 @@ openerp.web.Sidebar = openerp.web.Widget.extend({
|
||||||
};
|
};
|
||||||
self.rpc("/web/action/load", {
|
self.rpc("/web/action/load", {
|
||||||
action_id: item.action.id,
|
action_id: item.action.id,
|
||||||
context: _.extend({"bin_size": true}, additional_context)
|
context: additional_context
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
result.result.context = _.extend(result.result.context || {},
|
result.result.context = _.extend(result.result.context || {},
|
||||||
additional_context);
|
additional_context);
|
||||||
|
|
Loading…
Reference in New Issue