[IMP]import_google: Changes in yml file of partner

bzr revid: dbr@tinyerp.com-20110615123148-hr7xr276yzhkdjm5
This commit is contained in:
DBR (OpenERP) 2011-06-15 18:01:48 +05:30
parent 03d536c1cf
commit 8316035c83
3 changed files with 7 additions and 7 deletions

View File

@ -37,7 +37,7 @@ class crm_installer(osv.osv_memory):
'thunderbird': fields.boolean('Thunderbird', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
'outlook': fields.boolean('MS-Outlook', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
'wiki_sale_faq': fields.boolean('Sale FAQ', help="Helps you manage wiki pages for Frequently Asked Questions on Sales Application."),
'import_google': fields.boolean('Google Import', help="Imports contacts from your google account."),
'import_google': fields.boolean('Google Import', help="Imports contacts and events from your google account."),
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):

View File

@ -20,7 +20,7 @@
##############################################################################
{
'name': 'Google Contact Import',
'name': 'Google Import',
'version': '1.0',
'category': 'Generic Modules/Others',
'description': """The module adds google contact in partner address""",
@ -35,7 +35,7 @@
],
'demo_xml': [],
'test': [
# 'test/test_sync_google_contact_import_partner.yml',
'test/test_sync_google_contact_import_partner.yml',
'test/test_sync_google_contact_import_address.yml',
'test/test_sync_google_calendar.yml',
],

View File

@ -26,11 +26,11 @@
- |
I check whether the Partners are created or not.
-
!python {model: res.partner.address}: |
!python {model: res.partner.address }: |
addr_obj = self.pool.get('ir.model.data')
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])
data_ids = addr_obj.search(cr, uid, [('model','=','res.partner.address'),('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])
partner_ids = map(lambda x: x.partner_id.id, [addr for addr in self.browse(cr, uid, address_ids) if addr.partner_id])
assert partner_ids, 'Partners not created !'