summaryrefslogtreecommitdiff
path: root/addons/google_map/google_map_launch.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/google_map/google_map_launch.py')
-rw-r--r--addons/google_map/google_map_launch.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/addons/google_map/google_map_launch.py b/addons/google_map/google_map_launch.py
index 8ee9a16fb0a..f3ac20ac734 100644
--- a/addons/google_map/google_map_launch.py
+++ b/addons/google_map/google_map_launch.py
@@ -25,8 +25,7 @@ class launch_map(osv.osv):
_inherit = "res.partner"
def open_map(self, cr, uid, ids, context=None):
- address_obj= self.pool.get('res.partner')
- partner = address_obj.browse(cr, uid, ids, context=context)[0]
+ partner = self.browse(cr, uid, ids, context=context)[0]
url="http://maps.google.com/maps?oi=map&q="
if partner.street:
url+=partner.street.replace(' ','+')
@@ -39,9 +38,9 @@ class launch_map(osv.osv):
if partner.zip:
url+='+'+partner.zip.replace(' ','+')
return {
- 'type': 'ir.actions.act_url',
- 'url':url,
- 'target': 'new'
+ 'type': 'ir.actions.act_url',
+ 'url':url,
+ 'target': 'new'
}
launch_map()