projects
/
odoo
/
odoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[IMP]improve code where needed and replace res.partner instead of res.partner.address
[odoo/odoo.git]
/
addons
/
import_google
/
test
/
test_sync_google_contact_import_partner.yml
diff --git
a/addons/import_google/test/test_sync_google_contact_import_partner.yml
b/addons/import_google/test/test_sync_google_contact_import_partner.yml
index
4eadbf0
..
ca138b1
100644
(file)
--- a/
addons/import_google/test/test_sync_google_contact_import_partner.yml
+++ b/
addons/import_google/test/test_sync_google_contact_import_partner.yml
@@
-26,11
+26,11
@@
- |
I check whether the Partners are created or not.
-
- |
I check whether the Partners are created or not.
-
- !python {model: res.partner.address }: |
+ !python {model: res.partner }: |
addr_obj = self.pool.get('ir.model.data')
addr_ids = addr_obj.search(cr, uid, [])
addr_obj = self.pool.get('ir.model.data')
addr_ids = addr_obj.search(cr, uid, [])
- data_ids = addr_obj.search(cr, uid, [('model','=','res.partner.address'),('module','=','synchronize_google')])
+ data_ids = addr_obj.search(cr, uid, [('model','=','res.partner'),('module','=','synchronize_google')])
address_ids = map(lambda x: x.res_id, [child for child in addr_obj.browse(cr, uid, data_ids) if child.res_id])
address_ids = map(lambda x: x.res_id, [child for child in addr_obj.browse(cr, uid, data_ids) if child.res_id])
- partner_ids = map(lambda x: x.partner_id.id, [addr for addr in self.browse(cr, uid, address_ids) if addr.partner_id])
+ partner_ids = map(lambda x: x.parent_id.id, [addr for addr in self.browse(cr, uid, address_ids) if addr.parent_id])
assert partner_ids, 'Partners not created !'
\ No newline at end of file
assert partner_ids, 'Partners not created !'
\ No newline at end of file