Skip to content
Snippets Groups Projects
Commit 52eadd51 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] website: use SUPERUSER_ID to browse company for res_company

In a multi-company environment,
if the user signed in was not working in the company displayed by the website,
he couldn't browse the website
parent e29a7b7b
No related branches found
No related tags found
No related merge requests found
......@@ -142,12 +142,14 @@ class view(osv.osv):
if not context:
context = {}
company = self.pool['res.company'].browse(cr, SUPERUSER_ID, request.website.company_id.id, context=context)
qcontext = dict(
context.copy(),
website=request.website,
url_for=website.url_for,
slug=website.slug,
res_company=request.website.company_id,
res_company=company,
user_id=self.pool.get("res.users").browse(cr, uid, uid),
translatable=context.get('lang') != request.website.default_lang_code,
editable=request.website.is_publisher(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment