summaryrefslogtreecommitdiff
path: root/addons/google_map/google_map_launch.py
diff options
context:
space:
mode:
authorAntonin Bourguignon <abo@openerp.com>2012-10-02 12:29:15 +0200
committerAntonin Bourguignon <abo@openerp.com>2012-10-02 12:29:15 +0200
commit165333208000e7f8b2a61fd99c0a5b1f1d242976 (patch)
tree150c1a7d2f30b4043b1cd565c40324b773fec3d5 /addons/google_map/google_map_launch.py
parent2d2a44dcf2e3b29e4fef4000792a064862967769 (diff)
parentf285c0e481d12edfc2aa9aa1fd3baeb334bc39c6 (diff)
[MERGE] trunk
bzr revid: abo@openerp.com-20121002102915-424prxd74izb1szw
Diffstat (limited to 'addons/google_map/google_map_launch.py')
-rw-r--r--addons/google_map/google_map_launch.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/addons/google_map/google_map_launch.py b/addons/google_map/google_map_launch.py
index a60679e3b69..f3ac20ac734 100644
--- a/addons/google_map/google_map_launch.py
+++ b/addons/google_map/google_map_launch.py
@@ -22,11 +22,10 @@ from osv import osv
class launch_map(osv.osv):
- _inherit = "res.partner.address"
+ _inherit = "res.partner"
def open_map(self, cr, uid, ids, context=None):
- address_obj= self.pool.get('res.partner.address')
- 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()