summaryrefslogtreecommitdiff
path: root/addons/google_map/wizard/google_map_launch.py
diff options
context:
space:
mode:
authorBharat (OpenERP) <bde@tinyerp.com>2011-09-06 15:55:10 +0530
committerBharat (OpenERP) <bde@tinyerp.com>2011-09-06 15:55:10 +0530
commit7101e8134fc15969425bcc929ad1d14ed40ab340 (patch)
treec8ac59770075164e46b6f656d6079723318abe92 /addons/google_map/wizard/google_map_launch.py
parentad09b92e2e3eea61afeb30a447436a6900450acd (diff)
[IMP] improved the sequence of files in __openerp__.py and improved the coding of google_map_launch.py
bzr revid: bde@tinyerp.com-20110906102510-hgl0yoqze417ezvg
Diffstat (limited to 'addons/google_map/wizard/google_map_launch.py')
-rw-r--r--addons/google_map/wizard/google_map_launch.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/addons/google_map/wizard/google_map_launch.py b/addons/google_map/wizard/google_map_launch.py
index c42aff61378..ea0e63869e9 100644
--- a/addons/google_map/wizard/google_map_launch.py
+++ b/addons/google_map/wizard/google_map_launch.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -25,13 +25,14 @@ from osv import fields
import time
class launch_map(osv.osv_memory):
-
+
_name = "launch.map"
+ _description = "Google Map"
- def launch_wizard(self, cr, uid, data, context=None):
- address_obj= pooler.get_pool(cr.dbname).get('res.partner.address')
- m = address_obj.browse(cr, uid, data, context=context)[0]
- url=''
+ def launch_wizard(self, cr, uid, ids, context=None):
+ active_id = context.get('active_id', False)
+ address_obj= self.pool.get('res.partner.address')
+ m = address_obj.browse(cr, uid, active_id, context=context)
url="http://maps.google.com/maps?oi=map&q="
if m.street:
url+=m.street.replace(' ','+')