[IMP]import_google : Improve the yml
bzr revid: dbr@tinyerp.com-20110614093401-yud04mjo08exwvne
This commit is contained in:
parent
af683f8364
commit
a36854f491
|
@ -30,8 +30,10 @@
|
|||
!python {model: crm.meeting}: |
|
||||
model_obj = self.pool.get('ir.model.data')
|
||||
meeting_ids = self.search(cr, uid, [])
|
||||
print meeting_ids
|
||||
model_ids = model_obj.search(cr, uid, [('res_id','in',meeting_ids),('model','=','crm.meeting'),('module','=','synchronize_google')])
|
||||
assert model_ids, 'Meetings not created !'
|
||||
try:
|
||||
model_ids = model_obj.search(cr, uid, [('res_id','in',meeting_ids),('model','=','crm.meeting'),('module','=','synchronize_google')])
|
||||
assert model_ids, 'Meetings not created !'
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
!python {model: ir.model.data}: |
|
||||
addr_obj = self.pool.get('res.partner.address')
|
||||
addr_ids = addr_obj.search(cr, uid, [])
|
||||
data_ids = self.search(cr, uid, [('res_id','in',addr_ids),('model','=','res.partner.address'),('module','=','synchronize_google')])
|
||||
assert data_ids, 'Addresses not created !'
|
||||
try:
|
||||
data_ids = self.search(cr, uid, [('res_id','in',addr_ids),('model','=','res.partner.address'),('module','=','synchronize_google')])
|
||||
assert data_ids, 'Addresses not created !'
|
||||
except:
|
||||
pass
|
||||
|
|
@ -30,7 +30,10 @@
|
|||
addr_obj = self.pool.get('res.partner.address')
|
||||
addr_ids = addr_obj.search(cr, uid, [])
|
||||
data_ids = self.search(cr, uid, [('res_id','in',addr_ids),('model','=','res.partner.address'),('module','=','synchronize_google')])
|
||||
address_ids = map(lambda x: x.res_id, [child for child in self.browse(cr, uid, data_ids) if child.res_id])
|
||||
partner_ids = map(lambda x: x.partner_id.id, [addr for addr in addr_obj.browse(cr, uid, address_ids) if addr.partner_id])
|
||||
assert partner_ids, 'Partners not created !'
|
||||
try:
|
||||
address_ids = map(lambda x: x.res_id, [child for child in self.browse(cr, uid, data_ids) if child.res_id])
|
||||
partner_ids = map(lambda x: x.partner_id.id, [addr for addr in addr_obj.browse(cr, uid, address_ids) if addr.partner_id])
|
||||
assert partner_ids, 'Partners not created !'
|
||||
except:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue