diff options
| author | Christophe Matthieu <chm@openerp.com> | 2013-02-04 16:03:04 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2013-02-04 16:03:04 +0100 |
| commit | c349508149be291dc4a4e90d6f521baee6f3d9d7 (patch) | |
| tree | 11aa65bf0c921ff0ed96e9b464d47f91dc345aa5 /addons/web/static/src/js/views.js | |
| parent | 0d3004e8290b7d9ff90d1f84ee7353b6a9e75694 (diff) | |
[IMP] web view: remove insert_alias and add active_id, active_model, active_ids into the context for web/action/load
bzr revid: chm@openerp.com-20130204150304-j11944irbcp4o4gf
Diffstat (limited to 'addons/web/static/src/js/views.js')
| -rw-r--r-- | addons/web/static/src/js/views.js | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 4b532e633be..fbe53711c8a 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -1306,7 +1306,7 @@ instance.web.View = instance.web.Widget.extend({ } else if (action_data.type=="action") { return this.rpc('/web/action/load', { action_id: action_data.name, - context: instance.web.pyeval.eval('context', context), + context: _.extend({'active_model': dataset.model, 'active_ids': dataset.ids, 'active_id': record_id}, instance.web.pyeval.eval('context', context)), do_not_eval: true }).then(handler); } else { @@ -1395,26 +1395,6 @@ instance.web.View = instance.web.Widget.extend({ var attrs = this.fields_view.arch.attrs; return (action in attrs) ? JSON.parse(attrs[action]) : true; }, - /** - * insert alias into the dom - */ - insert_alias: function ($dom) { - var self = this; - var context = this.options.action.context || {}; - if (context && context.help_alias) { - new instance.web.Model('mail.alias').call("get_alias", [], { - 'model': this.options.action.res_model, - 'alias_defaults': context.help_alias - }).then(function (alias_ids) { - if (alias_ids.length && alias_ids[0].email.match(/@.+/)) { - // alias_ids[0].global - var $alias = $(QWeb.render('View.nocontent_alias')); - $alias.append('<a href="mailto:' + alias_ids[0].email + '">' + alias_ids[0].email + '</a>'); - $dom.append($alias); - } - }); - } - }, }); /** |
