[FIX] request.website browse record bad context
authorFabien Meghazi <fme@openerp.com>
Tue, 16 Sep 2014 09:27:06 +0000 (11:27 +0200)
committerFabien Meghazi <fme@openerp.com>
Tue, 16 Sep 2014 12:16:43 +0000 (14:16 +0200)
addons/website/models/ir_http.py

index f6a45ee..bee78eb 100644 (file)
@@ -120,6 +120,8 @@ class ir_http(orm.AbstractModel):
                         # to url without language so google doesn't see duplicate content
                         return request.redirect(path + '?' + request.httprequest.query_string, code=301)
                     return self.reroute(path)
+            # bind modified context
+            request.website = request.website.with_context(request.context)
         return super(ir_http, self)._dispatch()
 
     def reroute(self, path):