[FIX] report: update data with options for backward compatibility; Remove empty website_report module.

This commit is contained in:
Christophe Matthieu
2015-08-14 12:00:02 +02:00
parent 60003c44b0
commit f8357a1a60
3 changed files with 1 additions and 32 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ class ReportController(Controller):
if docids:
docids = [int(i) for i in docids.split(',')]
if data.get('options'):
data['options'] = simplejson.loads(data['options'])
data.update(simplejson.loads(data.pop('options')))
if data.get('context'):
# Ignore 'lang' here, because the context in data is the one from the webclient *but* if
# the user explicitely wants to change the lang, this mechanism overwrites it.
-16
View File
@@ -1,16 +0,0 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.addons.website.controllers.main import Website
from openerp.http import request, route
class Website(Website):
@route()
def customize_template_get(self, key, full=False, bundles=False):
res = super(Website, self).customize_template_get(key, full=full, bundles=bundles)
if full:
for r in request.session.get('report_view_ids', []):
res += super(Website, self).customize_template_get(r.get('xml_id'), full=full)
return res
-15
View File
@@ -1,15 +0,0 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.addons.web.http import request
from openerp.osv import osv
class Report(osv.Model):
_inherit = 'report'
def render(self, cr, uid, ids, template, values=None, context=None):
if request and hasattr(request, 'website'):
if request.website is not None:
request.session['report_view_ids'] = []
return super(Report, self).render(cr, uid, ids, template, values=values, context=context)