Browse Source

bugfix account_journal_report_xls

pull/7/merge
Luc De Meyer 11 years ago
parent
commit
6f018603b6
  1. 6
      account_journal_report_xls/__init__.py
  2. 7
      account_journal_report_xls/__openerp__.py
  3. 10
      account_journal_report_xls/report/nov_account_journal.py

6
account_journal_report_xls/__init__.py

@ -20,14 +20,8 @@
#
##############################################################################
try:
from . import account_journal
from . import wizard
from . import report
except ImportError:
import logging
logging.getLogger('openerp.module').warning('report_xls not available in addons path. account_financial_report_webkit_xls will not be usable')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

7
account_journal_report_xls/__openerp__.py

@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -47,9 +47,8 @@ cf. https://launchpad.net/openerp-reporting-engines
'account_voucher',
'report_xls',
],
'demo_xml': [],
'init_xml': [],
'update_xml': [
'demo': [],
'data': [
'wizard/print_journal_wizard.xml',
],
}

10
account_journal_report_xls/report/nov_account_journal.py

@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -165,6 +165,10 @@ class nov_journal_print(report_sxw.rml_parse):
#_logger.warn('code_string= %s', code_string)
[x.update({'docname': eval(code_string) or '-'}) for x in lines]
# group lines
if self.group_entries:
lines = self._group_lines(lines)
# format debit, credit, amount_currency for pdf report
if self.display_currency and self.report_type == 'pdf':
curr_obj = self.pool.get('res.currency')
@ -175,10 +179,6 @@ class nov_journal_print(report_sxw.rml_parse):
else:
[x.update({'amount1': self.formatLang(x['debit']), 'amount2': self.formatLang(x['credit'])}) for x in lines]
# group lines
if self.group_entries:
lines = self._group_lines(lines)
# insert a flag in every move_line to indicate the end of a move
# this flag will be used to draw a full line between moves
for cnt in range(len(lines) - 1):

Loading…
Cancel
Save