summaryrefslogtreecommitdiff
path: root/addons/google_docs
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2013-04-11 09:52:41 +0200
committerRaphael Collet <rco@openerp.com>2013-04-11 09:52:41 +0200
commit385f4dbaaa71e4ff6adef6ad2209b25134e95025 (patch)
tree8138886356327265a125fc3356ad6ed7727ad881 /addons/google_docs
parentef1cbabe251da67e870f9ad261488eac1931bf7c (diff)
parent894eeef8e0ff44b2bf0b276718e6f48a0a7c1ee6 (diff)
[MERGE] Avoid error-hiding calls like registry.get(X) when X is dynamic.
Use registry[X] instead, and test model existence with: X in registry. bzr revid: rco@openerp.com-20130411075241-0f5u1vzmtzcxwnp4
Diffstat (limited to 'addons/google_docs')
-rw-r--r--addons/google_docs/google_docs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py
index cdb14de1de3..3b060e199c0 100644
--- a/addons/google_docs/google_docs.py
+++ b/addons/google_docs/google_docs.py
@@ -155,7 +155,7 @@ class google_docs_ir_attachment(osv.osv):
pool_ir_attachment = self.pool.get('ir.attachment')
pool_gdoc_config = self.pool.get('google.docs.config')
name_gdocs = ''
- model_fields_dic = self.pool.get(res_model).read(cr, uid, res_id, [], context=context)
+ model_fields_dic = self.pool[res_model].read(cr, uid, res_id, [], context=context)
# check if a model is configured with a template
google_docs_config = pool_gdoc_config.search(cr, uid, [('model_id', '=', res_model)], context=context)