From d598c988ff6192e98e69af531d85a96525d9265a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 19 Nov 2013 18:33:02 +0100 Subject: [PATCH] [CLEAN] payment_acquirer_transfer: module cleaning, removed dummy tests, simplified form button to only display the acquirer message bzr revid: tde@openerp.com-20131119173302-6plxxftcivjapnd4 --- .../payment_acquirer_transfer/__openerp__.py | 21 +----- .../data/transfer.xml | 3 + .../models/payment_acquirer.py | 20 ------ .../tests/__init__.py | 7 -- .../payment_acquirer_transfer/tests/common.py | 66 ------------------- .../tests/test_transfer.py | 31 --------- .../views/transfer.xml | 6 +- 7 files changed, 5 insertions(+), 149 deletions(-) delete mode 100644 addons/payment_acquirer_transfer/tests/__init__.py delete mode 100644 addons/payment_acquirer_transfer/tests/common.py delete mode 100644 addons/payment_acquirer_transfer/tests/test_transfer.py diff --git a/addons/payment_acquirer_transfer/__openerp__.py b/addons/payment_acquirer_transfer/__openerp__.py index 4cb24f372aa..45293e4f84a 100644 --- a/addons/payment_acquirer_transfer/__openerp__.py +++ b/addons/payment_acquirer_transfer/__openerp__.py @@ -1,29 +1,10 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2013-Today OpenERP SA (). -# -# 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 . -# -############################################################################## { 'name': 'Transfer Payment Acquirer', 'category': 'Hidden', 'summary': 'Payment Acquirer: Transfer Implementation', - 'version': '0.1', + 'version': '1.0', 'description': """Transfer Payment Acquirer""", 'author': 'OpenERP SA', 'depends': ['payment_acquirer'], diff --git a/addons/payment_acquirer_transfer/data/transfer.xml b/addons/payment_acquirer_transfer/data/transfer.xml index c620c0c550f..441d39f1aab 100644 --- a/addons/payment_acquirer_transfer/data/transfer.xml +++ b/addons/payment_acquirer_transfer/data/transfer.xml @@ -7,6 +7,9 @@ test + Please use the account 001-002-003 to make the payment.

]]> +
diff --git a/addons/payment_acquirer_transfer/models/payment_acquirer.py b/addons/payment_acquirer_transfer/models/payment_acquirer.py index baac41a4a24..283868aa8e9 100644 --- a/addons/payment_acquirer_transfer/models/payment_acquirer.py +++ b/addons/payment_acquirer_transfer/models/payment_acquirer.py @@ -1,26 +1,6 @@ # -*- coding: utf-'8' "-*-" -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2013-Today OpenERP SA (). -# -# 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 openerp.osv import osv -# from openerp.osv import fields import logging diff --git a/addons/payment_acquirer_transfer/tests/__init__.py b/addons/payment_acquirer_transfer/tests/__init__.py deleted file mode 100644 index 5ba8270a936..00000000000 --- a/addons/payment_acquirer_transfer/tests/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import test_transfer - -checks = [ - test_transfer, -] diff --git a/addons/payment_acquirer_transfer/tests/common.py b/addons/payment_acquirer_transfer/tests/common.py deleted file mode 100644 index df368f5b1dd..00000000000 --- a/addons/payment_acquirer_transfer/tests/common.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Business Applications -# Copyright (c) 20123TODAY OpenERP S.A. -# -# 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 openerp.tests import common - - -class PaymentAcquirerCommon(common.TransactionCase): - - def setUp(self): - super(PaymentAcquirerCommon, self).setUp() - self.payment_acquirer = self.registry('payment.acquirer') - self.payment_transaction = self.registry('payment.transaction') - - self.currency_euro_id = self.registry('res.currency').search( - self.cr, self.uid, [('name', '=', 'EUR')], limit=1)[0] - self.currency_euro = self.registry('res.currency').browse( - self.cr, self.uid, self.currency_euro_id) - country_belgium_id = self.registry('res.country').search( - self.cr, self.uid, [('code', 'like', 'BE')], limit=1)[0] - - # dict partner values - self.buyer_values = { - 'name': 'Norbert Buyer', - 'lang': 'en_US', - 'email': 'norbert.buyer@example.com', - 'street': 'Huge Street', - 'street2': '2/543', - 'phone': '0032 12 34 56 78', - 'city': 'Sin City', - 'zip': '1000', - 'country_id': country_belgium_id, - 'country_name': 'Belgium', - } - - # test partner - self.buyer_id = self.registry('res.partner').create( - self.cr, self.uid, { - 'name': 'Norbert Buyer', - 'lang': 'en_US', - 'email': 'norbert.buyer@example.com', - 'street': 'Huge Street', - 'street2': '2/543', - 'phone': '0032 12 34 56 78', - 'city': 'Sin City', - 'zip': '1000', - 'country_id': country_belgium_id, - } - ) diff --git a/addons/payment_acquirer_transfer/tests/test_transfer.py b/addons/payment_acquirer_transfer/tests/test_transfer.py deleted file mode 100644 index 08ea688dc75..00000000000 --- a/addons/payment_acquirer_transfer/tests/test_transfer.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Business Applications -# Copyright (c) 2012-TODAY OpenERP S.A. -# -# 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 openerp.addons.payment_acquirer.tests.common import PaymentAcquirerCommon -# from openerp.addons.payment_acquirer_ogone.controllers.main import OgoneController -# from openerp.osv.orm import except_orm - - -class TransferPayment(PaymentAcquirerCommon): - - def test_00_transfer_form(self): - cr, uid = self.cr, self.uid - context = {} diff --git a/addons/payment_acquirer_transfer/views/transfer.xml b/addons/payment_acquirer_transfer/views/transfer.xml index f154f2078d0..8024bae85e8 100644 --- a/addons/payment_acquirer_transfer/views/transfer.xml +++ b/addons/payment_acquirer_transfer/views/transfer.xml @@ -5,11 +5,7 @@