summaryrefslogtreecommitdiff
path: root/addons/google_docs/google_docs.py
diff options
context:
space:
mode:
authorRoberto López López (OpenERP) <rlo@openerp.com>2012-03-16 10:00:54 +0100
committerRoberto López López (OpenERP) <rlo@openerp.com>2012-03-16 10:00:54 +0100
commitebb97da4d16ffdbf74091bc6742f1f175ac0142b (patch)
treeb83ddbc3caaa3dfb84f42a96708c0a6e6d7a0b4e /addons/google_docs/google_docs.py
parent78903a8554d776632a17cde897ddcd2a7093b329 (diff)
[fix] fix according to requirements
bzr revid: rlo@openerp.com-20120316090054-0datu37ojj98lx13
Diffstat (limited to 'addons/google_docs/google_docs.py')
-rw-r--r--addons/google_docs/google_docs.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py
index e78444fb045..e822bb304bf 100644
--- a/addons/google_docs/google_docs.py
+++ b/addons/google_docs/google_docs.py
@@ -106,7 +106,7 @@ class google_docs_ir_attachment(osv.osv):
class google_docs(osv.osv):
_name = 'google.docs'
- def doc_get(self, cr, uid, model, id, type_doc):# TODO fix logic here
+ def doc_get(self, cr, uid, model, id, type_doc):
google_docs_config_ref = self.pool.get('res.users')
ir_attachment_ref = self.pool.get('ir.attachment')
google_docs_config = google_docs_config_ref.search(cr, uid, [('context_model_id', '=', model)])
@@ -139,11 +139,11 @@ class config(osv.osv):
'context_multiple': False,
}
- def has_config_set(self, cr, uid, model):
- print model
- import pdb
- pdb.set_trace()
+ def get_config(self, cr, uid, model):
domain = [('context_model_id', '=', model)]
- return self.search_count(cr, uid, domain) != 0
+ if self.search_count(cr, uid, domain) != 0:
+ return False
+ else:
+ return self.search(cr, uid, domain)
config()