[REF]:Remove extra authentication

bzr revid: dbr@tinyerp.com-20110613130634-x5ky8g5vaopy5bw2
This commit is contained in:
DBR (OpenERP)
2011-06-13 18:36:34 +05:30
parent 9680b58470
commit a5f2c367bf
@@ -31,7 +31,6 @@ from osv import osv
from tools.translate import _
from import_google import google_import
class google_login_contact(osv.osv_memory):
_inherit = 'google.login'
_name = 'google.login.contact'
@@ -124,13 +123,9 @@ class synchronize_google(osv.osv_memory):
gmail_user = user_obj.gmail_user
gmail_pwd = user_obj.gmail_password
google = self.pool.get('google.login')
if not gmail_user or not gmail_pwd:
raise osv.except_osv(_('Error'), _("Invalid login detail !\n Specify Username/Password."))
if context.get('contact'):
gd_client = google.google_login(gmail_user, gmail_pwd, type='contact')
if not gd_client:
raise osv.except_osv(_('Error'), _("Please specify correct user and password !"))
if obj.group_name not in ['all']:
query = gdata.contacts.service.ContactsQuery()
query.group = obj.group_name