[IMP] Improvement in thunderbird for partner information

bzr revid: ksa@tinyerp.co.in-20100714134321-amz63jut2i2da9yh
This commit is contained in:
ksa (Open ERP) 2010-07-14 19:13:21 +05:30
parent d59d7fd9ff
commit 6538f97f58
2 changed files with 19 additions and 0 deletions

View File

@ -101,6 +101,15 @@ class tinythunderbird_partner(osv.osv):
dictcreate = dict(vals)
create_id = self.pool.get('res.partner.address').create(cr, user, dictcreate)
return create_id
# def thunderbird_createcontact1(self,cr,user,vals):
# dictcreate = dict(vals)
# address_obj = self.pool.get('res.partner.address')
# search_id = address_obj.search(cr, user,[('name','=',dictcreate['name'])])
# if search_id:
# return 0
#create_id = address_obj.create(cr, user, dictcreate)
#return create_id
def thunderbird_createpartner(self,cr,user,vals):
dictcreate = dict(vals)
@ -109,8 +118,18 @@ class tinythunderbird_partner(osv.osv):
if search_id:
return 0
create_id = address_obj.create(cr, user, dictcreate)
return create_id
def thunderbird_createnewaddress(self,cr,user,vals):
dictcreate = dict(vals)
address_obj = self.pool.get('res.partner.address')
search_id = address_obj.search(cr, user,[('name','=',dictcreate['name'])])
if search_id:
return 0
create_id = address_obj.create(cr, user, dictcreate)
return create_id
def thunderbird_searchobject(self,cr,user,vals):
dictcreate = dict(vals)
search_id = self.pool.get('ir.model').search(cr, user,[('model','=',dictcreate['model'])])