mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[ADD] Boilerplate
This commit is contained in:
1
account_banking_aggregate_payment/__init__.py
Normal file
1
account_banking_aggregate_payment/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
import model
|
||||
38
account_banking_aggregate_payment/__openerp__.py
Normal file
38
account_banking_aggregate_payment/__openerp__.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
|
||||
#
|
||||
# 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': 'Account Banking Aggregate Payment',
|
||||
'version': '0.1.136',
|
||||
'license': 'GPL-3',
|
||||
'author': 'Therp BV',
|
||||
'website': 'https://launchpad.net/banking-addons',
|
||||
'category': 'Banking addons',
|
||||
'depends': ['account_banking'],
|
||||
'data': [
|
||||
'view/payment_mode.xml',
|
||||
'data/payment_mode_type.xml',
|
||||
],
|
||||
},
|
||||
'description': '''
|
||||
Allows for aggregating several payments on a single partner
|
||||
''',
|
||||
'active': False,
|
||||
}
|
||||
37
account_banking_aggregate_payment/data/payment_mode_type.xml
Normal file
37
account_banking_aggregate_payment/data/payment_mode_type.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record model="payment.mode.type"
|
||||
id="type_all">
|
||||
<field name="name">Aggregate payment order for all accounts</field>
|
||||
<field name="code">AGG_ALL</field>
|
||||
<field name="suitable_bank_types"
|
||||
eval="[(6, 0, (ref('base_iban.bank_iban'),
|
||||
ref('base.bank_normal')))]" />
|
||||
<field name="ir_model_id"
|
||||
ref="model_banking_export_aggregate"/>
|
||||
</record>
|
||||
|
||||
<record model="payment.mode.type"
|
||||
id="type_iban">
|
||||
<field name="name">Aggregate payment order for IBAN accounts</field>
|
||||
<field name="code">AGG_IBAN</field>
|
||||
<field name="suitable_bank_types"
|
||||
eval="[(6, 0, (ref('base_iban.bank_iban')))]" />
|
||||
<field name="ir_model_id"
|
||||
ref="model_banking_export_aggregate"/>
|
||||
</record>
|
||||
|
||||
<record model="payment.mode.type"
|
||||
id="type_dmst">
|
||||
<field name="name">Aggregate payment order for domestic accounts</field>
|
||||
<field name="code">AGG_DMST</field>
|
||||
<field name="suitable_bank_types"
|
||||
eval="[(6, 0, (ref('base.bank_normal')))]" />
|
||||
<field name="ir_model_id"
|
||||
ref="model_banking_export_aggregate"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
34
account_banking_aggregate_payment/model/payment_mode.py
Normal file
34
account_banking_aggregate_payment/model/payment_mode.py
Normal file
@@ -0,0 +1,34 @@
|
||||
o# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
|
||||
#
|
||||
# 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 orm, fields
|
||||
|
||||
|
||||
class payment_mode(orm.Model):
|
||||
_inherit = "payment.mode"
|
||||
_columns = {
|
||||
'aggregate_partner_id': fields.many2one(
|
||||
'res.partner', 'Aggregate partner id',
|
||||
),
|
||||
'chained_mode_id': fields.many2one(
|
||||
'payment.mode', 'Chained payment mode'),
|
||||
}
|
||||
|
||||
25
account_banking_aggregate_payment/view/payment_mode.xml
Normal file
25
account_banking_aggregate_payment/view/payment_mode.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_payment_mode_form" model="ir.ui.view">
|
||||
<field name="name">Adaptations for aggregate payment modes</field>
|
||||
<field name="model">payment.mode</field>
|
||||
<field name="inherit_id"
|
||||
ref="account_payment.view_payment_mode_form"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="type" position="after">
|
||||
<group attributes="{'invisible': [
|
||||
('type', 'not in', (
|
||||
%('account_banking_aggregate_payment.type_iban')d,
|
||||
%('account_banking_aggregate_payment.type_all')d,
|
||||
%('account_banking_aggregate_payment.type_dmst')d
|
||||
))]}">
|
||||
<field name="aggregate_partner_id" />
|
||||
<field name="chained_mode_id" />
|
||||
</group>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user