diff options
| author | Thibault Delavallée <tde@openerp.com> | 2013-04-26 15:27:21 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2013-04-26 15:27:21 +0200 |
| commit | 0dada27fcd725291bc487e1f47434b0ddfef54b7 (patch) | |
| tree | a9e6dda35fd9e69c016d5b79bf7b8155f0e82091 /addons/mail/static/src | |
| parent | 71b245598ebc7754a916bf92f812b9a284246778 (diff) | |
| parent | a75cc23573e375544feb81cc51a0300efe7c40bc (diff) | |
[MERGE] Revisions 8997 ... 8999 of 7.0 branch.
bzr revid: tde@openerp.com-20130426132721-02lkoc41fms9ve1k
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index b1a579ba057..6f1e75d5136 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1841,10 +1841,19 @@ openerp.mail = function (session) { this._super(parent, action); this.action = _.clone(action); + // debugger this.domain = this.action.params.domain || this.action.domain || []; this.context = _.extend(this.action.params.context || {}, this.action.context || {}); + // filter some parameters that we will propagate as search_default this.defaults = {}; + for (var key in this.action.context.params) { + if (_.indexOf(['model', 'res_id'], key) == -1) { + continue; + } + this.context['search_default_' + key] = this.action.context.params[key]; + console.log(this.context); + } for (var key in this.context) { if (key.match(/^search_default_/)) { this.defaults[key.replace(/^search_default_/, '')] = this.context[key]; |
