From 8316035c835468d64ad423825feb726249bdc3f7 Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Wed, 15 Jun 2011 18:01:48 +0530 Subject: [PATCH] [IMP]import_google: Changes in yml file of partner bzr revid: dbr@tinyerp.com-20110615123148-hr7xr276yzhkdjm5 --- addons/crm/crm_installer.py | 2 +- addons/import_google/__openerp__.py | 4 ++-- .../test/test_sync_google_contact_import_partner.yml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/crm/crm_installer.py b/addons/crm/crm_installer.py index f48526b6846..f6c61337ce4 100644 --- a/addons/crm/crm_installer.py +++ b/addons/crm/crm_installer.py @@ -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): diff --git a/addons/import_google/__openerp__.py b/addons/import_google/__openerp__.py index a4ee5846258..083f34b4f27 100644 --- a/addons/import_google/__openerp__.py +++ b/addons/import_google/__openerp__.py @@ -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', ], 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 c5eae099ada..4eadbf0f100 100644 --- 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. - - !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 !' \ No newline at end of file