[FIX] website: add missing decorator for better guess type

The definition of the render method was guessed as cr_uid_context instead of
cr_uid_ids_context, making calls in the new api breaks
Fixes #4401
This commit is contained in:
Jos De Graeve 2014-12-23 11:38:18 +01:00 committed by Martin Trigaux
parent a175ed6b2f
commit 544eefdd32
1 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import copy
from lxml import etree, html
from openerp import SUPERUSER_ID
from openerp import SUPERUSER_ID, api
from openerp.addons.website.models import website
from openerp.http import request
from openerp.osv import osv, fields
@ -128,6 +128,7 @@ class view(osv.osv):
return arch
@api.cr_uid_ids_context
def render(self, cr, uid, id_or_xml_id, values=None, engine='ir.qweb', context=None):
if request and getattr(request, 'website_enabled', False):
engine='website.qweb'