From dab31d0989b1320aa08a1d876f4a9c4c5cb1c7b6 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Wed, 5 Jun 2013 17:44:55 +0200 Subject: [PATCH] [ADD] Boilerplate --- account_banking_aggregate_payment/__init__.py | 1 + .../__openerp__.py | 38 +++++++++++++++++++ .../data/payment_mode_type.xml | 37 ++++++++++++++++++ .../model/payment_mode.py | 34 +++++++++++++++++ .../view/payment_mode.xml | 25 ++++++++++++ 5 files changed, 135 insertions(+) create mode 100644 account_banking_aggregate_payment/__init__.py create mode 100644 account_banking_aggregate_payment/__openerp__.py create mode 100644 account_banking_aggregate_payment/data/payment_mode_type.xml create mode 100644 account_banking_aggregate_payment/model/payment_mode.py create mode 100644 account_banking_aggregate_payment/view/payment_mode.xml diff --git a/account_banking_aggregate_payment/__init__.py b/account_banking_aggregate_payment/__init__.py new file mode 100644 index 000000000..16e8b082f --- /dev/null +++ b/account_banking_aggregate_payment/__init__.py @@ -0,0 +1 @@ +import model diff --git a/account_banking_aggregate_payment/__openerp__.py b/account_banking_aggregate_payment/__openerp__.py new file mode 100644 index 000000000..1d0a2513e --- /dev/null +++ b/account_banking_aggregate_payment/__openerp__.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Therp BV (). +# +# 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': '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, +} diff --git a/account_banking_aggregate_payment/data/payment_mode_type.xml b/account_banking_aggregate_payment/data/payment_mode_type.xml new file mode 100644 index 000000000..945621a49 --- /dev/null +++ b/account_banking_aggregate_payment/data/payment_mode_type.xml @@ -0,0 +1,37 @@ + + + + + + Aggregate payment order for all accounts + AGG_ALL + + + + + + Aggregate payment order for IBAN accounts + AGG_IBAN + + + + + + Aggregate payment order for domestic accounts + AGG_DMST + + + + + + diff --git a/account_banking_aggregate_payment/model/payment_mode.py b/account_banking_aggregate_payment/model/payment_mode.py new file mode 100644 index 000000000..cb7ae692c --- /dev/null +++ b/account_banking_aggregate_payment/model/payment_mode.py @@ -0,0 +1,34 @@ +o# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Therp BV (). +# +# 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 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'), + } + diff --git a/account_banking_aggregate_payment/view/payment_mode.xml b/account_banking_aggregate_payment/view/payment_mode.xml new file mode 100644 index 000000000..5871a2b36 --- /dev/null +++ b/account_banking_aggregate_payment/view/payment_mode.xml @@ -0,0 +1,25 @@ + + + + + Adaptations for aggregate payment modes + payment.mode + + form + + + + + + + + + + +