|
@ -3,7 +3,7 @@ |
|
|
# |
|
|
# |
|
|
# OpenERP, Open Source Management Solution |
|
|
# 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 |
|
|
# This program is free software: you can redistribute it and/or modify |
|
|
# it under the terms of the GNU Affero General Public License as |
|
|
# 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) |
|
|
#_logger.warn('code_string= %s', code_string) |
|
|
[x.update({'docname': eval(code_string) or '-'}) for x in lines] |
|
|
[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 |
|
|
# format debit, credit, amount_currency for pdf report |
|
|
if self.display_currency and self.report_type == 'pdf': |
|
|
if self.display_currency and self.report_type == 'pdf': |
|
|
curr_obj = self.pool.get('res.currency') |
|
|
curr_obj = self.pool.get('res.currency') |
|
@ -175,10 +179,6 @@ class nov_journal_print(report_sxw.rml_parse): |
|
|
else: |
|
|
else: |
|
|
[x.update({'amount1': self.formatLang(x['debit']), 'amount2': self.formatLang(x['credit'])}) for x in lines] |
|
|
[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 |
|
|
# 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 |
|
|
# this flag will be used to draw a full line between moves |
|
|
for cnt in range(len(lines) - 1): |
|
|
for cnt in range(len(lines) - 1): |
|
@ -215,7 +215,7 @@ class nov_journal_print(report_sxw.rml_parse): |
|
|
grouped_lines = [lines_in[0]] |
|
|
grouped_lines = [lines_in[0]] |
|
|
move_id = lines_in[0]['move_id'] |
|
|
move_id = lines_in[0]['move_id'] |
|
|
line_cnt = len(lines_in) |
|
|
line_cnt = len(lines_in) |
|
|
for i in range(1,line_cnt): |
|
|
|
|
|
|
|
|
for i in range(1, line_cnt): |
|
|
line = lines_in[i] |
|
|
line = lines_in[i] |
|
|
if line['move_id'] == move_id: |
|
|
if line['move_id'] == move_id: |
|
|
grouped_lines.append(line) |
|
|
grouped_lines.append(line) |
|
|