|
|
@ -1,27 +1,11 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
############################################################################## |
|
|
|
# |
|
|
|
# OpenERP, Open Source Management Solution |
|
|
|
# This module copyright (C) 2014 Therp BV (<http://therp.nl>). |
|
|
|
# |
|
|
|
# This program is free software: you can redistribute it and/or modify |
|
|
|
# it under the terms of the GNU Affero General Public License as |
|
|
|
# published by the Free Software Foundation, either version 3 of the |
|
|
|
# License, or (at your option) any later version. |
|
|
|
# |
|
|
|
# This program is distributed in the hope that it will be useful, |
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
|
# GNU Affero General Public License for more details. |
|
|
|
# |
|
|
|
# You should have received a copy of the GNU Affero General Public License |
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
# |
|
|
|
############################################################################## |
|
|
|
# Copyright 2014 Therp BV (<http://therp.nl>). |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
import simplejson |
|
|
|
from openerp import http |
|
|
|
from openerp.addons.web.controllers import main |
|
|
|
from openerp.addons.email_template import email_template |
|
|
|
from openerp.addons.mail.models import mail_template |
|
|
|
|
|
|
|
|
|
|
|
class Reports(main.Reports): |
|
|
@ -41,7 +25,7 @@ class Reports(main.Reports): |
|
|
|
continue |
|
|
|
objects = http.request.session.model(context['active_model'])\ |
|
|
|
.browse(context['active_ids']) |
|
|
|
generated_filename = email_template.mako_template_env\ |
|
|
|
generated_filename = mail_template.mako_template_env\ |
|
|
|
.from_string(report.download_filename)\ |
|
|
|
.render({ |
|
|
|
'objects': objects, |
|
|
|