diff options
| author | Denis Ledoux <dle@odoo.com> | 2014-09-30 14:05:02 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2014-09-30 14:05:54 +0200 |
| commit | fca2f5ce31f6d72faffcced9345ea87ebe8dddae (patch) | |
| tree | 2d70e97106cbf295580898ffd221fe94ee71b77e /addons | |
| parent | a01ce6a127af5cba7bf4f3d162c5aed427fc7668 (diff) | |
[FIX] im_livechat: ir.config_parameter must be read as superuser
As ir.config_parameter is restricted to employees in ACL, for security reasons
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/im_livechat/im_livechat.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/im_livechat/im_livechat.py b/addons/im_livechat/im_livechat.py index cfc6bb9ce8e..5925084f4ee 100644 --- a/addons/im_livechat/im_livechat.py +++ b/addons/im_livechat/im_livechat.py @@ -107,7 +107,7 @@ class im_livechat_channel(osv.osv): res = {} for record in self.browse(cr, uid, ids, context=context): res[record.id] = env.get_template("include.html").render({ - "url": self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url'), + "url": self.pool.get('ir.config_parameter').get_param(cr, openerp.SUPERUSER_ID, 'web.base.url'), "parameters": {"db":cr.dbname, "channel":record.id}, }) return res @@ -115,7 +115,7 @@ class im_livechat_channel(osv.osv): def _web_page(self, cr, uid, ids, name, arg, context=None): res = {} for record in self.browse(cr, uid, ids, context=context): - res[record.id] = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url') + \ + res[record.id] = self.pool.get('ir.config_parameter').get_param(cr, openerp.SUPERUSER_ID, 'web.base.url') + \ "/im_livechat/web_page?p=" + json.dumps({"db":cr.dbname, "channel":record.id}) return res |
