[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
This commit is contained in:
parent
5fddd6b6f2
commit
d598c988ff
|
@ -1,29 +1,10 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Transfer Payment Acquirer',
|
'name': 'Transfer Payment Acquirer',
|
||||||
'category': 'Hidden',
|
'category': 'Hidden',
|
||||||
'summary': 'Payment Acquirer: Transfer Implementation',
|
'summary': 'Payment Acquirer: Transfer Implementation',
|
||||||
'version': '0.1',
|
'version': '1.0',
|
||||||
'description': """Transfer Payment Acquirer""",
|
'description': """Transfer Payment Acquirer""",
|
||||||
'author': 'OpenERP SA',
|
'author': 'OpenERP SA',
|
||||||
'depends': ['payment_acquirer'],
|
'depends': ['payment_acquirer'],
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
<field name="view_template_id" ref="transfer_acquirer_button"/>
|
<field name="view_template_id" ref="transfer_acquirer_button"/>
|
||||||
<field name="env">test</field>
|
<field name="env">test</field>
|
||||||
<field name="portal_published" eval="False"/>
|
<field name="portal_published" eval="False"/>
|
||||||
|
<field name="message"><![CDATA[
|
||||||
|
<p>Please use the account 001-002-003 to make the payment.</p>]]>
|
||||||
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -1,26 +1,6 @@
|
||||||
# -*- coding: utf-'8' "-*-"
|
# -*- coding: utf-'8' "-*-"
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# OpenERP, Open Source Management Solution
|
|
||||||
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp.osv import osv
|
from openerp.osv import osv
|
||||||
# from openerp.osv import fields
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import test_transfer
|
|
||||||
|
|
||||||
checks = [
|
|
||||||
test_transfer,
|
|
||||||
]
|
|
|
@ -1,66 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# OpenERP, Open Source Business Applications
|
|
||||||
# Copyright (c) 20123TODAY OpenERP S.A. <http://www.openerp.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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
)
|
|
|
@ -1,31 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# OpenERP, Open Source Business Applications
|
|
||||||
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.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 <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
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 = {}
|
|
|
@ -5,11 +5,7 @@
|
||||||
<!-- templates -->
|
<!-- templates -->
|
||||||
<template id="transfer_acquirer_button">
|
<template id="transfer_acquirer_button">
|
||||||
<div>
|
<div>
|
||||||
<table>
|
<t t-field="acquirer.message"/>
|
||||||
<tr><td>Bank account</td><td></td></tr>
|
|
||||||
<tr><td>Communication</td><td><t t-esc="reference"/></td></tr>
|
|
||||||
</table>
|
|
||||||
<a t-att-href="return_url" class="btn btn-primary">Validate & Pay <span class="icon-long-arrow-right"/></a>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue