diff --git a/addons/account_voucher/report/__init__.py b/addons/account_voucher/report/__init__.py index a59ff9c9250..cb6cf3a8bcd 100644 --- a/addons/account_voucher/report/__init__.py +++ b/addons/account_voucher/report/__init__.py @@ -20,4 +20,3 @@ ############################################################################## import report_voucher -import report_voucher_amount diff --git a/addons/account_voucher/report/report_voucher_amount.py b/addons/account_voucher/report/report_voucher_amount.py deleted file mode 100644 index b691ca638f0..00000000000 --- a/addons/account_voucher/report/report_voucher_amount.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import time -from report import report_sxw -from tools import amount_to_text_en - -class report_voucher_amount(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): - super(report_voucher_amount, self).__init__(cr, uid, name, context) - self.localcontext.update({ - 'time': time, - 'convert':self.convert - }) - - def convert(self, amount, cur): - amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur); - return amt_en - - -report_sxw.report_sxw( - 'report.voucher.cash_amount', - 'account.voucher', - 'addons/account_voucher/report/report_voucher_amount.rml', - parser=report_voucher_amount,header="external" -) diff --git a/addons/account_voucher/report/report_voucher_amount.rml b/addons/account_voucher/report/report_voucher_amount.rml deleted file mode 100755 index e2dccc05e74..00000000000 --- a/addons/account_voucher/report/report_voucher_amount.rml +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects,'voucher') ]] - - - - Type: - - - [[ voucher.journal_id.nme ]] - - - Number: - - - [[ voucher.number ]] - - - Date: - - - [[ formatLang(voucher.date , date=True) or '' ]] - - - - - - - State: - - - PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]] - Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]] - Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]] - Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]] - - - Ref: - - - [[ voucher.reference ]] - - - Account: - - - [[ voucher.account_id.name ]] - - - - - - - - - - - - - Particulars - - - Amount - - - - - - -
- [[ repeatIn(voucher.payment_ids,'payment_ids') ]] - - - - [[ payment_ids.partner_id and payment_ids.partner_id.name or '' ]] - - - [[ payment_ids.amount ]] - - - - - [[ payment_ids.account_id.name ]] - - - - - - - - - - [[ payment_ids.ref ]] [[ payment_ids.amount ]] - - - - - - - - - - [[ payment_ids.type ]] - - - - - - - - - - - -
- - - - - - - Through : - - - - - - - - - - [[ voucher.narration or '' ]] - - - - - - - - - - On Account of : - - - - - - - - - - [[ voucher.name ]] - - - - - - - - - - Amount (in words) : - - - - - - - - - - [[ convert(voucher.amount,voucher.currency_id.name) ]] - - - - - - - - - - - - - - - - - - - - [[ voucher.amount ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Receiver's Signature - - - - - - - - - - - - - Authorised Signatory - - - - - - -
-
diff --git a/addons/account_voucher/test/account_voucher_report.yml b/addons/account_voucher/test/account_voucher_report.yml index eddb313c776..39e9c2144a2 100644 --- a/addons/account_voucher/test/account_voucher_report.yml +++ b/addons/account_voucher/test/account_voucher_report.yml @@ -15,15 +15,6 @@ name: Voucher Axelor period_id: account.period_6 -- - In order to test the PDF reports defined on a account_voucher, we will print account voucher amount Report -- - !python {model: account.voucher}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.voucher.cash_amount').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account_voucher-amount.'+format), 'wb+').write(data) - - In order to test the PDF reports defined on a account_voucher, we will print account voucher Report -