From 8ae07d4cbabfc99155a4eae5c3d22cfab19bd8da Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 14 Nov 2013 10:02:23 +0100 Subject: [PATCH] [FIX] website: helper google_map for res.company bzr revid: chm@openerp.com-20131114090223-2gl6y7shh6f7fplm --- addons/website/models/website.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/models/website.py b/addons/website/models/website.py index e34139273f1..4038965ae49 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -548,10 +548,10 @@ class res_partner(osv.osv): class res_company(osv.osv): _inherit = "res.company" def google_map_img(self, cr, uid, ids, zoom=8, width=298, height=298, context=None): - partner = self.browse(cr, openerp.SUPERUSER_ID, ids[0], context=context).parent_id + partner = self.browse(cr, openerp.SUPERUSER_ID, ids[0], context=context).partner_id return partner and partner.google_map_img(zoom, width, height, context=context) or None def google_map_link(self, cr, uid, ids, zoom=8, context=None): - partner = self.browse(cr, openerp.SUPERUSER_ID, ids[0], context=context).parent_id + partner = self.browse(cr, openerp.SUPERUSER_ID, ids[0], context=context).partner_id return partner and partner.google_map_link(zoom, context=context) or None class base_language_install(osv.osv):