[ADD] sync_google_contact: Add google_id in res partner

bzr revid: sbh@tinyerp.com-20110215061305-cd5054y3lrstf1lf
This commit is contained in:
Sbh (OpenERP)
2011-02-15 11:43:05 +05:30
parent 440da7c2ee
commit 6078a281f7
2 changed files with 11 additions and 8 deletions
+1 -8
View File
@@ -27,13 +27,6 @@ from osv import fields,osv,orm
class res_partner_sync_base:
_inherit = "res.partner.address"
_columns = {
'sync_google':fields.boolean('Synchronize with Google', required=False),
}
_defaults = {
'sync_google':lambda *a:True
}
def create(self, cr, uid, vals, context=None):
id = super(res_partner_sync_base, self).create(cr, uid, vals, context=context)
return id
@@ -53,7 +46,7 @@ class res_partner_sync_base:
def sync_modify(self, cr, uid, ids, vals, context=None, synchronize=True):
return True
def sync_modify(self, cr, uid, ids,context=None, synchronize=True):
def sync_unlink(self, cr, uid, ids,context=None, synchronize=True):
return True
res_partner_sync_base()
@@ -66,6 +66,16 @@ class google_lib(object):
self.contact.DeleteContact(selected_entry.GetEditLink().href)
return True
class res_partner_sync_base:
_inherit = "res.partner.address"
_columns = {
'sync_google':fields.boolean('Synchronize with Google'),
'google_id': fields.char('Google Contact Id', size=128, readonly=True),
}
res_partner_sync_base()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: