[MERGE] ir.actions.url was renamed to ir.actions.act_url to enforce a uniform naming convention in ir.actions.*
Cfr. server rev-id odo@openerp.com-20121002091349-x97h13xuarefdkdv bzr revid: odo@openerp.com-20121002091748-3j5h5di2ib07z60i
This commit is contained in:
commit
63cd3ce267
|
@ -1567,13 +1567,6 @@ class Binary(openerpweb.Controller):
|
|||
class Action(openerpweb.Controller):
|
||||
_cp_path = "/web/action"
|
||||
|
||||
# For most actions, the type attribute and the model name are the same, but
|
||||
# there are exceptions. This dict is used to remap action type attributes
|
||||
# to the "real" model name when they differ.
|
||||
action_mapping = {
|
||||
"ir.actions.act_url": "ir.actions.url",
|
||||
}
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
def load(self, req, action_id, do_not_eval=False):
|
||||
Actions = req.session.model('ir.actions.actions')
|
||||
|
@ -1597,8 +1590,7 @@ class Action(openerpweb.Controller):
|
|||
if action_type == 'ir.actions.report.xml':
|
||||
ctx.update({'bin_size': True})
|
||||
ctx.update(context)
|
||||
action_model = self.action_mapping.get(action_type, action_type)
|
||||
action = req.session.model(action_model).read([action_id], False, ctx)
|
||||
action = req.session.model(action_type).read([action_id], False, ctx)
|
||||
if action:
|
||||
value = clean_action(req, action[0], do_not_eval)
|
||||
return {'result': value}
|
||||
|
|
Loading…
Reference in New Issue