diff options
| author | Raphael Collet <rco@openerp.com> | 2013-03-29 15:37:20 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2013-03-29 15:37:20 +0100 |
| commit | 96ad6088540cc4cea5ea656f9350623cfecbc4a5 (patch) | |
| tree | e3559385110ff961f5519f1dff2c258406e2d9c0 /addons/plugin/plugin_handler.py | |
| parent | c88ee699e248a3b267b61b6dbffcbe9224c0bceb (diff) | |
[IMP] general: use registry[X] instead registry.get(X) when X is dynamic
bzr revid: rco@openerp.com-20130329143720-80pkd4csemlk1aqz
Diffstat (limited to 'addons/plugin/plugin_handler.py')
| -rw-r--r-- | addons/plugin/plugin_handler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 0664af1c92e..b4b5064f2b1 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -57,7 +57,7 @@ class plugin_handler(osv.osv_memory): res_id = msg.res_id model = msg.model url = self._make_url(cr, uid, res_id, model) - name = self.pool.get(model).name_get(cr, uid, [res_id])[0][1] + name = self.pool[model].name_get(cr, uid, [res_id])[0][1] return (model,res_id, url,name) def document_type(self, cr, uid, context=None): @@ -81,7 +81,7 @@ class plugin_handler(osv.osv_memory): @return : the result of name_search a list of tuple [(id, 'name')] """ - return self.pool.get(model).name_search(cr, uid, name) + return self.pool[model].name_search(cr, uid, name) def push_message(self, cr, uid, model, email, res_id=0): """ @@ -91,7 +91,7 @@ class plugin_handler(osv.osv_memory): @return Dictionary which contain model , url and resource id. """ mail_message = self.pool.get('mail.message') - model_obj = self.pool.get(model) + model_obj = self.pool[model] msg = self.pool.get('mail.thread').message_parse(cr, uid, email) message_id = msg.get('message-id') mail_ids = mail_message.search(cr, uid, [('message_id','=',message_id),('res_id','=',res_id),('model','=',model)]) |
