1
# -*- encoding: utf-8 -*-
2
##############################################################################
4
# OpenERP, Open Source Management Solution
6
# Copyright (c) 2013 Noviat nv/sa (www.noviat.be). All rights reserved.
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU Affero General Public License as
10
# published by the Free Software Foundation, either version 3 of the
11
# License, or (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU Affero General Public License for more details.
18
# You should have received a copy of the GNU Affero General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
23
from osv import fields, osv
25
#_logger = logging.getLogger(__name__)
27
class general_ledger_webkit_wizard(osv.osv_memory):
28
_inherit = 'general.ledger.webkit'
30
def xls_export(self, cr, uid, ids, context=None):
31
return self.check_report(cr, uid, ids, context=context)
33
def _print_report(self, cr, uid, ids, data, context=None):
34
context = context or {}
35
if context.get('xls_export'):
36
# we update form with display account value
37
data = self.pre_print_report(cr, uid, ids, data, context=context)
38
return {'type': 'ir.actions.report.xml',
39
'report_name': 'account.account_report_general_ledger_xls',
42
return super(general_ledger_webkit_wizard, self)._print_report(cr, uid, ids, data, context=context)
44
general_ledger_webkit_wizard()