[ADD] Boilerplate

This commit is contained in:
Stefan Rijnhart
2013-06-05 17:44:55 +02:00
parent 123ed7c993
commit dab31d0989
5 changed files with 135 additions and 0 deletions

View File

@@ -0,0 +1 @@
import model

View 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,
}

View 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>

View 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'),
}

View 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>