diff options
| author | Antony Lesuisse <al@openerp.com> | 2011-11-23 12:46:51 +0530 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2011-11-23 12:46:51 +0530 |
| commit | 1ca5b10918ff2c2bc81a4cad616bd6fcea81eef9 (patch) | |
| tree | 3e6b268ec5c3da79ac8e88d157f91b79bb6967c8 /addons/plugin/plugin_handler.py | |
| parent | 9e34f30b75a28ae926dbee9a1e667dc6e98e7a8a (diff) | |
[FIX] project data, plugin document_get
bzr revid: al@openerp.com-20111123071651-0frq669h3f9cm7tu
Diffstat (limited to 'addons/plugin/plugin_handler.py')
| -rw-r--r-- | addons/plugin/plugin_handler.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index b21f7423263..c4859771e35 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -41,20 +41,22 @@ class plugin_handler(osv.osv_memory): model = False res_id = 0 url = False + name = "" msg = mail_message_obj.parse_message(email) references = [msg.get('message-id')] refs = msg.get('references',False) if refs: references.extend(refs.split()) - + msg_ids = mail_message_obj.search(cr, uid, [('message_id','in',references)]) if msg_ids: msg = mail_message_obj.browse(cr, uid, msg_ids[0]) res_id = msg.res_id model = msg.model url = self._make_url(cr, uid, res_id, model) - return (model, res_id, url) + name = self.pool.get(model).name_get(cr, uid, res_id)[1] + return (model, res_id, url, name) def document_type(self, cr, uid, context=None): """ |
