[FIX] web: bootstrap template rendered using request uid
authorChristophe Simonis <chs@openerp.com>
Wed, 26 Feb 2014 15:55:36 +0000 (16:55 +0100)
committerChristophe Simonis <chs@openerp.com>
Wed, 26 Feb 2014 15:55:36 +0000 (16:55 +0100)
bzr revid: chs@openerp.com-20140226155536-5z7r50bzxxackg1d

addons/web/controllers/main.py

index 03ae42f..b84efc7 100644 (file)
@@ -616,7 +616,8 @@ def render_bootstrap_template(db, template, values=None, debug=False, lazy=False
         registry = openerp.modules.registry.RegistryManager.get(db)
         with registry.cursor() as cr:
             view_obj = registry["ir.ui.view"]
-            return view_obj.render(cr, openerp.SUPERUSER_ID, template, values)
+            uid = request.uid or openerp.SUPERUSER_ID
+            return view_obj.render(cr, uid, template, values)
     if lazy:
         return LazyResponse(callback, template=template, values=values)
     else: