[FIX] share: do not hardcode the server url

bzr revid: chs@openerp.com-20111219111525-hlkww0n4e9ejpfhh
This commit is contained in:
Christophe Simonis 2011-12-19 12:15:25 +01:00
parent d6d2968af2
commit 75fdf278b6
1 changed files with 2 additions and 1 deletions

View File

@ -127,11 +127,12 @@ class share_wizard(osv.osv_memory):
user = wizard.result_line_ids[0]
return """
<script type="text/javascript" src="http://localhost:8069/web/webclient/js"></script>
<script type="text/javascript" src="%(base_url)s/web/webclient/js"></script>
<script type="text/javascript">
new openerp.init(%(init)s).web.embed(%(server)s, %(dbname)s, %(login)s, %(password)s,%(action)d%(options)s);
</script> """ % {
'init': simplejson.dumps(openerp.conf.server_wide_modules),
'base_url': base_url or '',
'server': simplejson.dumps(base_url),
'dbname': simplejson.dumps(cr.dbname),
'login': simplejson.dumps(user.login),