[MERGE] forward port of branch 8.0 up to d350f5b
This commit is contained in:
@@ -1255,7 +1255,7 @@ class Action(http.Controller):
|
||||
except Exception:
|
||||
action_id = 0 # force failed read
|
||||
|
||||
base_action = Actions.read([action_id], ['name', 'type'], request.context)
|
||||
base_action = Actions.read([action_id], ['type'], request.context)
|
||||
if base_action:
|
||||
ctx = request.context
|
||||
action_type = base_action[0]['type']
|
||||
@@ -1265,7 +1265,7 @@ class Action(http.Controller):
|
||||
ctx.update(additional_context)
|
||||
action = request.session.model(action_type).read([action_id], False, ctx)
|
||||
if action:
|
||||
value = clean_action(dict(action[0], **base_action[0]))
|
||||
value = clean_action(action[0])
|
||||
return value
|
||||
|
||||
@http.route('/web/action/run', type='json', auth="user")
|
||||
|
||||
@@ -1144,7 +1144,8 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
||||
|
||||
self.rpc("/web/action/load", {
|
||||
action_id: item.action.id,
|
||||
context: c
|
||||
context: new instance.web.CompoundContext(
|
||||
self.dataset.get_context(), active_ids_context).eval()
|
||||
}).done(function(result) {
|
||||
result.context = new instance.web.CompoundContext(
|
||||
result.context || {}, active_ids_context)
|
||||
|
||||
Reference in New Issue
Block a user