From 96ad6088540cc4cea5ea656f9350623cfecbc4a5 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Fri, 29 Mar 2013 15:37:20 +0100 Subject: [IMP] general: use registry[X] instead registry.get(X) when X is dynamic bzr revid: rco@openerp.com-20130329143720-80pkd4csemlk1aqz --- addons/google_docs/google_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/google_docs/google_docs.py') 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) -- cgit v1.2.3 From e69326ee3b32bf50805bf1aca73d941a3bbcd2fe Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 15 Apr 2013 12:23:49 +0200 Subject: [REF] removed explicit model instanciations. bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz --- addons/google_docs/google_docs.py | 1 - 1 file changed, 1 deletion(-) (limited to 'addons/google_docs/google_docs.py') diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py index 3b060e199c0..2fd1976ae3b 100644 --- a/addons/google_docs/google_docs.py +++ b/addons/google_docs/google_docs.py @@ -191,4 +191,3 @@ This is the id of the template document, on google side. You can find it thanks _defaults = { 'name_template': 'gdoc_%(name)s', } -config() -- cgit v1.2.3