diff --git a/account_check_deposit/__openerp__.py b/account_check_deposit/__openerp__.py index c0ee889f1..d61fa872e 100644 --- a/account_check_deposit/__openerp__.py +++ b/account_check_deposit/__openerp__.py @@ -47,12 +47,14 @@ check deposits. 'report_webkit', ], 'data': [ - 'account_deposit_view.xml', - 'account_deposit_sequence.xml', - 'company_view.xml', - 'security/ir.model.access.csv', - 'security/check_deposit_security.xml', - 'account_data.xml', + 'account_deposit_view.xml', + 'account_deposit_sequence.xml', + 'company_view.xml', + 'security/ir.model.access.csv', + 'security/check_deposit_security.xml', + 'account_data.xml', + 'report.xml', + 'report/report_checkdeposit.xml', ], 'installable': False, 'application': True, diff --git a/account_check_deposit/account_deposit_view.xml b/account_check_deposit/account_deposit_view.xml index 3c09da374..ef71dd787 100644 --- a/account_check_deposit/account_deposit_view.xml +++ b/account_check_deposit/account_deposit_view.xml @@ -10,14 +10,6 @@ - account.check.deposit.form diff --git a/account_check_deposit/report.xml b/account_check_deposit/report.xml new file mode 100644 index 000000000..4d7d5f1ef --- /dev/null +++ b/account_check_deposit/report.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/account_check_deposit/report/__init__.py b/account_check_deposit/report/__init__.py deleted file mode 100644 index 6d4950f0c..000000000 --- a/account_check_deposit/report/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# account_check_deposit for Odoo/OpenERP -# Copyright (C) 2012-2014 Akretion (http://www.akretion.com/) -# -# 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 . -# -############################################################################### - -from . import report_webkit_html diff --git a/account_check_deposit/report/check_deposit.mako b/account_check_deposit/report/check_deposit.mako deleted file mode 100644 index 67a660ebe..000000000 --- a/account_check_deposit/report/check_deposit.mako +++ /dev/null @@ -1,90 +0,0 @@ -# -*- coding: utf-8 -*- - - - - - -%for deposit in objects : -<% setLang(deposit.company_id.partner_id.lang) %> -${_("Deposit Slip of Checks in ")} ${deposit.currency_id.name} - - - - - - - - - - - - - - -
${_("Deposit Date")}${_("Deposit Ref")}${_("Beneficiary")}${_("Bank Account Number")}
${formatLang(deposit.deposit_date, date=True)}${deposit.name}${deposit.company_id.partner_id.name}${deposit.partner_bank_id.acc_number}
- -

${_("Check Payments")}

- - - - - - - - - - - - %for move_line in deposit.check_payment_ids : - - - - - - - - - %endfor - %endfor - - - - - - -
${_("Payment Date")}${_("Reference")}${_("Debtor")}${_("Amount")}
${move_line.date or ''}${move_line.ref or ''}${move_line.partner_id.name or ''}${deposit.currency_id == deposit.company_id.currency_id and move_line.debit or move_line.amount_currency} ${deposit.currency_id.name}
${_("Total:")}${deposit.total_amount or '0'} ${deposit.currency_id.name}
- - - diff --git a/account_check_deposit/report/report_checkdeposit.xml b/account_check_deposit/report/report_checkdeposit.xml new file mode 100644 index 000000000..c5aeacd41 --- /dev/null +++ b/account_check_deposit/report/report_checkdeposit.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + diff --git a/account_check_deposit/report/report_webkit_html.py b/account_check_deposit/report/report_webkit_html.py deleted file mode 100644 index 9d8a2f77c..000000000 --- a/account_check_deposit/report/report_webkit_html.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# account_check_deposit for Odoo/OpenERP -# Copyright (C) 2012-2014 Akretion (http://www.akretion.com/) -# @author: Benoît GUILLOT -# @author: Chafique DELLI -# -# 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 - - -class report_webkit_html(report_sxw.rml_parse): - - def __init__(self, cr, uid, name, context): - super(report_webkit_html, self).__init__( - cr, uid, name, context=context) - self.localcontext.update({ - 'time': time, - 'cr': cr, - 'uid': uid, - }) - -report_sxw.report_sxw('report.account.check.deposit', - 'account.check.deposit', - 'addons/account_check_deposit/report/check_deposit.mako', - parser=report_webkit_html)