From 12fcd1be2f1a891b7fe099ad0044e68c45280907 Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Fri, 19 Nov 2010 19:18:01 +0530 Subject: [IMP] : Added context=None on methods used for _constraints and replaced context={} with context=None. bzr revid: uco@tinyerp.com-20101119134801-974ev29j4tu46pq2 --- addons/google_map/wizard/google_map_launch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'addons/google_map/wizard/google_map_launch.py') diff --git a/addons/google_map/wizard/google_map_launch.py b/addons/google_map/wizard/google_map_launch.py index 12ab32fbf54..6ae9c19d2ce 100644 --- a/addons/google_map/wizard/google_map_launch.py +++ b/addons/google_map/wizard/google_map_launch.py @@ -25,9 +25,11 @@ import pooler from osv import fields import time -def _launch_wizard(self, cr, uid, data, context): +def _launch_wizard(self, cr, uid, data, context=None): + if not context: + context = {} address_obj= pooler.get_pool(cr.dbname).get('res.partner.address') - m= address_obj.browse(cr,uid,data['id'],context) + m= address_obj.browse(cr, uid, data['id'], context=context) url='' url="http://maps.google.com/maps?oi=map&q=" if m.street: -- cgit v1.2.3 From 6dd290e8245f4ea91ce87b0f3b5f29bafeaf12e9 Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Tue, 23 Nov 2010 12:35:05 +0530 Subject: [REF]: Replace the condition 'if not context' with 'if context is None'. bzr revid: uco@tinyerp.com-20101123070505-9i2lrqhgxzaii3zn --- addons/google_map/wizard/google_map_launch.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'addons/google_map/wizard/google_map_launch.py') diff --git a/addons/google_map/wizard/google_map_launch.py b/addons/google_map/wizard/google_map_launch.py index 6ae9c19d2ce..a2b3003da7c 100644 --- a/addons/google_map/wizard/google_map_launch.py +++ b/addons/google_map/wizard/google_map_launch.py @@ -26,8 +26,6 @@ from osv import fields import time def _launch_wizard(self, cr, uid, data, context=None): - if not context: - context = {} address_obj= pooler.get_pool(cr.dbname).get('res.partner.address') m= address_obj.browse(cr, uid, data['id'], context=context) url='' -- cgit v1.2.3