now that we have a cleaner system to switch translation when calling a qweb template.
Update the docstring too.
Replace :
<t t-foreach="doc_ids" t-as="doc_id">
<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', account.report_invoice_document')"/>
</t>
By :
<t t-foreach="doc_ids" t-as="doc_id">
<t t-call="'account.report_invoice_document" t-lang="doc_id.partner_id.lang"/>µ
</t>
Impacted modules : acccount, purchase, report_intrastat.
16 lines
547 B
Python
16 lines
547 B
Python
# -*- 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)
|