[imp] minor improvement for future bug fix
[odoo/odoo.git] / addons / crm_partner_assign / partner_geo_assign.py
index 15439ef..f522cc6 100644 (file)
@@ -94,7 +94,7 @@ class res_partner(osv.osv):
             contact = partner.address[0] #TOFIX: should be get latitude and longitude for default contact?
             addr = ', '.join(filter(None, [
                     contact.street, 
-                    ("%s %s" % (contact.zip or '', contact.city or '')).strip(), 
+                    "%s %s" % (contact.zip , contact.city), 
                     contact.state_id and contact.state_id.name, 
                     contact.country_id and contact.country_id.name]))
             result = geo_find(tools.ustr(addr))
@@ -160,8 +160,8 @@ class crm_lead(osv.osv):
             if not lead.country_id:
                 continue
             addr = ', '.join(filter(None, [
-                    lead.street,  
-                    ("%s %s" % (lead.zip or '', lead.city or '')).strip(), 
+                    lead.street, 
+                    "%s %s" % (lead.zip, lead.city), 
                     lead.state_id and lead.state_id.name or '', 
                     lead.country_id and lead.country_id.name or ''
             ]))