From 7b0b0d091abbeb09c9ab1004fadabea8691834a4 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Tue, 14 Oct 2008 17:03:20 +0530 Subject: [PATCH] Central Journal Report Completed...(Rana Vinay) bzr revid: patelamit2003@gmail.com-20081014113320-d1egy01n9f9ep37s --- addons/account/report/central_journal.py | 2 +- addons/account/report/central_journal.rml | 272 ++++++++++++++-------- 2 files changed, 181 insertions(+), 93 deletions(-) diff --git a/addons/account/report/central_journal.py b/addons/account/report/central_journal.py index c4dab8fc600..7b595a311a7 100644 --- a/addons/account/report/central_journal.py +++ b/addons/account/report/central_journal.py @@ -55,7 +55,7 @@ class journal_print(report_sxw.rml_parse): def _sum_credit(self, period_id, journal_id): self.cr.execute('select sum(credit) from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\'', (period_id, journal_id)) return self.cr.fetchone()[0] or 0.0 -report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/central_journal.rml',parser=journal_print) +report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/central_journal.rml',parser=journal_print, header=False) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/central_journal.rml b/addons/account/report/central_journal.rml index 359465379d2..ade1659de58 100644 --- a/addons/account/report/central_journal.rml +++ b/addons/account/report/central_journal.rml @@ -3,6 +3,30 @@ @@ -10,44 +34,62 @@ - - - - - - - - - - - - - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - @@ -55,104 +97,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + - [[ repeatIn(objects, 'o') ]] - + + - Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] - + - + [[ repeatIn(objects, 'o') ]] + - Account number + Journal Code - Account name + Journal Name - Currency - - - Debit - - - Credit + Printing Date - + - [[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]][[ line['code'] ]] + [[ o.journal_id.code or '' ]] - [[ line['name'] ]] + [[ o.journal_id.name ]] - - - - - - [[ line['debit'] and '%.2f' % line['debit'] or '' ]] - - - [[ line['credit'] and '%.2f' % line['credit'] or '' ]] + [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] - - - - TOTAL: - - - [[ '%.2f' % sum_debit(o.period_id.id, o.journal_id.id) ]] - - - [[ '%.2f' % sum_credit(o.period_id.id, o.journal_id.id) ]] - - - - + - - + + + + + + + Account Num. + + + Account Name + + + Debit + + + Credit + + + + + + + + + Total: + + + + + + + + [[ '%.2f' % sum_debit(o.period_id.id, o.journal_id.id) ]] + + + [[ '%.2f' % sum_credit(o.period_id.id, o.journal_id.id) ]] + + + + + + + + + [[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]] + + + + [[ line['code'] ]] + + + [[ line['name'] ]] + + + [[ formatLang(line['debit']) and '%.2f' % line['debit'] or '0.00' ]] + + + [[ formatLang(line['credit']) and '%.2f' % line['credit'] or '0.00' ]] + + + + + + + -