From dc822ca892751a324db5e83e756de277d5fbbc14 Mon Sep 17 00:00:00 2001 From: vra Date: Mon, 20 Sep 2010 16:10:59 +0530 Subject: [PATCH 01/56] [ADD][IMP][REM] account, account_voucher: added another format voucher report , improved the existing reports and removed the unused voucher report. bzr revid: vra@tinyerp.com-20100920104059-iizb7h5g3lwuls7a --- addons/account/report/voucher_print.py | 8 + addons/account/report/voucher_print.rml | 117 +++++----- addons/account_voucher/report/__init__.py | 2 +- .../account_voucher/report/report_voucher.py | 7 + .../account_voucher/report/report_voucher.rml | 69 +++--- .../report/report_voucher_amount.py | 44 ---- .../report/report_voucher_print.py | 94 ++++++++ ...er_amount.rml => report_voucher_print.rml} | 212 ++++++++---------- addons/account_voucher/voucher_report.xml | 11 + 9 files changed, 314 insertions(+), 250 deletions(-) delete mode 100644 addons/account_voucher/report/report_voucher_amount.py create mode 100644 addons/account_voucher/report/report_voucher_print.py rename addons/account_voucher/report/{report_voucher_amount.rml => report_voucher_print.rml} (71%) diff --git a/addons/account/report/voucher_print.py b/addons/account/report/voucher_print.py index 7501bab7bf0..8d763837c1f 100644 --- a/addons/account/report/voucher_print.py +++ b/addons/account/report/voucher_print.py @@ -30,6 +30,7 @@ class report_voucher_move(report_sxw.rml_parse): self.localcontext.update({ 'time': time, 'convert':self.convert, + 'get_title': self.get_title, 'debit':self.debit, 'credit':self.credit, #'get_ref' : self._get_ref @@ -41,6 +42,13 @@ class report_voucher_move(report_sxw.rml_parse): cur = user_id.company_id.currency_id.name amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur); return amt_en + + def get_title(self, voucher): + title = '' + if voucher.journal_id: + type = voucher.journal_id.type + title = type[0].swapcase() + type[1:] + " Voucher" + return title def debit(self, move_ids): debit = 0.0 diff --git a/addons/account/report/voucher_print.rml b/addons/account/report/voucher_print.rml index b1d7941068c..f84a93fbfdd 100644 --- a/addons/account/report/voucher_print.rml +++ b/addons/account/report/voucher_print.rml @@ -1,6 +1,6 @@ -