← Back to team overview

account-payment-team team mailing list archive

[Merge] lp:~acysos-team/account-payment/account-payment-sepa-6.1 into lp:account-payment

 

Ignacio Ibeas (www.acysos.com) has proposed merging lp:~acysos-team/account-payment/account-payment-sepa-6.1 into lp:account-payment.

Requested reviews:
  Account Payment (account-payment-team)

For more details, see:
https://code.launchpad.net/~acysos-team/account-payment/account-payment-sepa-6.1/+merge/205499

Hello,

The same development of this merge https://code.launchpad.net/~acysos-team/account-payment/account-payment-sepa-7.0/+merge/203211 for OpenERP 6.1

Greetings
-- 
The attached diff has been truncated due to its size.
https://code.launchpad.net/~acysos-team/account-payment/account-payment-sepa-6.1/+merge/205499
Your team Account Payment is requested to review the proposed merge of lp:~acysos-team/account-payment/account-payment-sepa-6.1 into lp:account-payment.
=== added directory 'account_payment_direct_debit'
=== added file 'account_payment_direct_debit/__init__.py'
--- account_payment_direct_debit/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/__init__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,1 @@
+import model

=== added file 'account_payment_direct_debit/__openerp__.py'
--- account_payment_direct_debit/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/__openerp__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,56 @@
+##############################################################################
+#
+#    Copyright (C) 2011 - 2013 Therp BV (<http://therp.nl>).
+#    Copyright (C) 2011 Smile (<http://smile.fr>).
+#    Copyright (C) 2014 Acysos S.L. (<http://acysos.com>).
+#    @author: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+#    All Rights Reserved
+#
+#    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': 'Direct Debit',
+    'version': '7.0.2.134',
+    'license': 'AGPL-3',
+    'author': ['Therp BV', 'Smile'],
+    'website': 'https://launchpad.net/account-payment',
+    'category': 'Banking addons',
+    'depends': ['account_payment_extension'],
+    'data': [
+        'view/account_payment.xml',
+        'view/account_invoice.xml',
+        'view/payment_type.xml',
+        'workflow/account_invoice.xml',
+        'data/account_payment_term.xml',
+    ],
+    'description': '''
+This module adds support for direct debit orders, analogous to payment orders.
+A new entry in the Accounting/Payment menu allow you to create a direct debit
+order that helps you to select any customer invoices for you to collect.
+
+This module explicitely implements direct debit orders as applicable
+in the Netherlands. Debit orders are advanced in total by the bank.
+Amounts that cannot be debited or are canceled by account owners are
+credited afterwards. Such a creditation is called a storno. This style of
+direct debit order may not apply to your country.
+
+This module depends on and is part of the account payment for OpenERP. This set
+of modules helps you to provide support for communications with your local
+banking institutions.
+
+Adapted to account_payment_extension by Acysos S.L. <info@xxxxxxxxxx>
+    ''',
+    'installable': True,
+}

=== added directory 'account_payment_direct_debit/data'
=== added file 'account_payment_direct_debit/data/account_payment_term.xml'
--- account_payment_direct_debit/data/account_payment_term.xml	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/data/account_payment_term.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="1">
+        <record id="payment_term_direct_debit" model="account.payment.term">
+            <field name="name">Direct debit</field>
+            <field name="note">Direct debit in 14 days</field>
+        </record>
+        <record id="payment_term_line_direct_debit" model="account.payment.term.line">
+            <field name="name">Direct debit in 14 days</field>
+            <field name="value">balance</field>
+            <field eval="14" name="days"/>
+            <field eval="0" name="days2"/>
+            <field eval="payment_term_direct_debit" name="payment_id"/>
+        </record>
+    </data>
+</openerp>

=== added directory 'account_payment_direct_debit/i18n'
=== added file 'account_payment_direct_debit/i18n/account_direct_debit.pot'
--- account_payment_direct_debit/i18n/account_direct_debit.pot	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/i18n/account_direct_debit.pot	2014-02-09 15:13:05 +0000
@@ -0,0 +1,133 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_direct_debit
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-25 16:01+0000\n"
+"PO-Revision-Date: 2013-10-25 16:01+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_direct_debit
+#: model:account.payment.term,note:account_direct_debit.payment_term_direct_debit
+msgid "Direct debit in 14 days"
+msgstr ""
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_payment_order
+msgid "Payment Order"
+msgstr ""
+
+#. module: account_direct_debit
+#: view:payment.order:0
+msgid "Select Invoices to Collect"
+msgstr ""
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_payment_line
+msgid "Payment Line"
+msgstr ""
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/payment_line.py:140
+#, python-format
+msgid "Can not reconcile"
+msgstr ""
+
+#. module: account_direct_debit
+#: view:account.invoice:0
+msgid "Debit Denied"
+msgstr ""
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/account_invoice.py:147
+#, python-format
+msgid "Error !"
+msgstr ""
+
+#. module: account_direct_debit
+#: view:account.invoice:0
+msgid "Show only invoices with state Debit denied"
+msgstr ""
+
+#. module: account_direct_debit
+#: view:payment.order:0
+msgid "{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', 'payment')]}"
+msgstr ""
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_account_move_line
+msgid "Journal Items"
+msgstr ""
+
+#. module: account_direct_debit
+#: view:account.invoice:0
+msgid "Debit denied"
+msgstr ""
+
+#. module: account_direct_debit
+#: model:ir.actions.act_window,name:account_direct_debit.action_debit_order_tree
+#: model:ir.ui.menu,name:account_direct_debit.menu_action_debit_order_form
+msgid "Direct Debit Orders"
+msgstr ""
+
+#. module: account_direct_debit
+#: model:account.payment.term,name:account_direct_debit.payment_term_direct_debit
+msgid "Direct debit"
+msgstr ""
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/account_invoice.py:148
+#, python-format
+msgid "You cannot set invoice '%s' to state 'debit denied', as it is still reconciled."
+msgstr ""
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/account_invoice.py:152
+#, python-format
+msgid "Invoice '%s': direct debit is denied."
+msgstr ""
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/payment_line.py:141
+#, python-format
+msgid "Cancelation of payment line '%s' has already been processed"
+msgstr ""
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_payment_order_create
+msgid "payment.order.create"
+msgstr ""
+
+#. module: account_direct_debit
+#: field:payment.line,storno:0
+msgid "Storno"
+msgstr ""
+
+#. module: account_direct_debit
+#: help:payment.line,storno:0
+msgid "If this is true, the debit order has been canceled by the bank or by the customer"
+msgstr ""
+
+#. module: account_direct_debit
+#: model:ir.actions.act_window,help:account_direct_debit.action_debit_order_tree
+msgid "A debit order is a debit request from your company to collect customer invoices. Here you can register all debit orders that should be done, keep track of all debit orders and mention the invoice reference and the partner the withdrawal should be done for."
+msgstr ""
+
+#. module: account_direct_debit
+#: field:account.move.line,amount_to_receive:0
+msgid "Amount to receive"
+msgstr ""
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_account_invoice
+msgid "Invoice"
+msgstr ""
+

=== added file 'account_payment_direct_debit/i18n/es.po'
--- account_payment_direct_debit/i18n/es.po	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/i18n/es.po	2014-02-09 15:13:05 +0000
@@ -0,0 +1,133 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment_direct_debit
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0-20131224-002412\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-25 11:27+0000\n"
+"PO-Revision-Date: 2014-01-25 11:27+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_payment_direct_debit
+#: model:account.payment.term,note:account_payment_direct_debit.payment_term_direct_debit
+msgid "Direct debit in 14 days"
+msgstr "Adeudos directos en 14 días"
+
+#. module: account_payment_direct_debit
+#: model:ir.model,name:account_payment_direct_debit.model_payment_order
+msgid "Payment Order"
+msgstr "Orden de pago"
+
+#. module: account_payment_direct_debit
+#: field:payment.type,payment_order_type:0
+msgid "Payment order type"
+msgstr "Tipo de orden de pago"
+
+#. module: account_payment_direct_debit
+#: model:ir.model,name:account_payment_direct_debit.model_payment_line
+msgid "Payment Line"
+msgstr "Línea de pago"
+
+#. module: account_payment_direct_debit
+#: model:ir.model,name:account_payment_direct_debit.model_payment_mode
+msgid "Payment Mode"
+msgstr "Modo de pago"
+
+#. module: account_payment_direct_debit
+#: code:addons/account_payment_direct_debit/model/payment_line.py:140
+#, python-format
+msgid "Can not reconcile"
+msgstr "No se puede reconciliar"
+
+#. module: account_payment_direct_debit
+#: view:account.invoice:0
+msgid "Debit Denied"
+msgstr "Adeudo denegado"
+
+#. module: account_payment_direct_debit
+#: code:addons/account_payment_direct_debit/model/account_invoice.py:147
+#, python-format
+msgid "Error !"
+msgstr "Error !"
+
+#. module: account_payment_direct_debit
+#: view:account.invoice:0
+msgid "Show only invoices with state Debit denied"
+msgstr "Mostrar solo las facturas con adeudo denegado"
+
+#. module: account_payment_direct_debit
+#: model:ir.model,name:account_payment_direct_debit.model_account_move_line
+msgid "Journal Items"
+msgstr "Apuntes contables"
+
+#. module: account_payment_direct_debit
+#: selection:payment.type,payment_order_type:0
+msgid "Payment"
+msgstr "Pago"
+
+#. module: account_payment_direct_debit
+#: view:account.invoice:0
+msgid "Debit denied"
+msgstr "Adeudo denegado"
+
+#. module: account_payment_direct_debit
+#: model:account.payment.term,name:account_payment_direct_debit.payment_term_direct_debit
+#: selection:payment.type,payment_order_type:0
+msgid "Direct debit"
+msgstr "Adeudo directo"
+
+#. module: account_payment_direct_debit
+#: code:addons/account_payment_direct_debit/model/account_invoice.py:148
+#, python-format
+msgid "You cannot set invoice '%s' to state 'debit denied', as it is still reconciled."
+msgstr "No puede cambiar la factura '%s' a estado 'Adeudo denegado', porque esta aun conciliada."
+
+#. module: account_payment_direct_debit
+#: code:addons/account_payment_direct_debit/model/account_invoice.py:152
+#, python-format
+msgid "Invoice '%s': direct debit is denied."
+msgstr "Factura '%s': adeudo directo es denegado."
+
+#. module: account_payment_direct_debit
+#: model:ir.model,name:account_payment_direct_debit.model_payment_order_create
+msgid "payment.order.create"
+msgstr "pago.orden.crear"
+
+#. module: account_payment_direct_debit
+#: field:payment.line,storno:0
+msgid "Storno"
+msgstr "Anulación"
+
+#. module: account_payment_direct_debit
+#: help:payment.line,storno:0
+msgid "If this is true, the debit order has been canceled by the bank or by the customer"
+msgstr "Si esta seleccionado, el adeudo directo ha sido cancelado por el banco o el cliente"
+
+#. module: account_payment_direct_debit
+#: model:ir.model,name:account_payment_direct_debit.model_payment_type
+msgid "Payment type"
+msgstr "Tipo de pago"
+
+#. module: account_payment_direct_debit
+#: code:addons/account_payment_direct_debit/model/payment_line.py:141
+#, python-format
+msgid "Cancelation of payment line '%s' has already been processed"
+msgstr "La cancelación de la linea de pago '%s' ha sido procesada"
+
+#. module: account_payment_direct_debit
+#: field:account.move.line,amount_to_receive:0
+msgid "Amount to receive"
+msgstr "Cantidad a recibir"
+
+#. module: account_payment_direct_debit
+#: model:ir.model,name:account_payment_direct_debit.model_account_invoice
+msgid "Invoice"
+msgstr "Factura"
+

=== added file 'account_payment_direct_debit/i18n/nl.po'
--- account_payment_direct_debit/i18n/nl.po	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/i18n/nl.po	2014-02-09 15:13:05 +0000
@@ -0,0 +1,155 @@
+# Dutch translation for banking-addons
+# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
+# This file is distributed under the same license as the banking-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: banking-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2013-10-25 16:01+0000\n"
+"PO-Revision-Date: 2013-12-03 11:31+0000\n"
+"Last-Translator: Erwin van der Ploeg (BAS Solutions) <Unknown>\n"
+"Language-Team: Dutch <nl@xxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-12-04 05:59+0000\n"
+"X-Generator: Launchpad (build 16861)\n"
+
+#. module: account_direct_debit
+#: model:account.payment.term,note:account_direct_debit.payment_term_direct_debit
+msgid "Direct debit in 14 days"
+msgstr "Incasso opdracht in 14 dagen"
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_payment_order
+msgid "Payment Order"
+msgstr "Betalingsopdracht"
+
+#. module: account_direct_debit
+#: view:payment.order:0
+msgid "Select Invoices to Collect"
+msgstr "Selecteer openstaande posten ter incasso"
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_payment_line
+msgid "Payment Line"
+msgstr "Betaalregel"
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/payment_line.py:140
+#, python-format
+msgid "Can not reconcile"
+msgstr "Kan niet afletteren"
+
+#. module: account_direct_debit
+#: view:account.invoice:0
+msgid "Debit Denied"
+msgstr "Incasso geweigerd"
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/account_invoice.py:147
+#, python-format
+msgid "Error !"
+msgstr "Fout !"
+
+#. module: account_direct_debit
+#: view:account.invoice:0
+msgid "Show only invoices with state Debit denied"
+msgstr "Laat alleen facturen zien waarvan de incasso is geweigerd"
+
+#. module: account_direct_debit
+#: view:payment.order:0
+msgid ""
+"{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', "
+"'payment')]}"
+msgstr ""
+"{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', "
+"'payment')]}"
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_account_move_line
+msgid "Journal Items"
+msgstr "Boekingen"
+
+#. module: account_direct_debit
+#: view:account.invoice:0
+msgid "Debit denied"
+msgstr "Incasso geweigerd"
+
+#. module: account_direct_debit
+#: model:ir.actions.act_window,name:account_direct_debit.action_debit_order_tree
+#: model:ir.ui.menu,name:account_direct_debit.menu_action_debit_order_form
+msgid "Direct Debit Orders"
+msgstr "Incasso opdracht"
+
+#. module: account_direct_debit
+#: model:account.payment.term,name:account_direct_debit.payment_term_direct_debit
+msgid "Direct debit"
+msgstr "Incasso opdracht"
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/account_invoice.py:148
+#, python-format
+msgid ""
+"You cannot set invoice '%s' to state 'debit denied', as it is still "
+"reconciled."
+msgstr ""
+"Het is niet mogelijk om factuur '%s' in status 'Incasso geweigerd' te "
+"zetten, omdat deze nog is afgeletterd."
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/account_invoice.py:152
+#, python-format
+msgid "Invoice '%s': direct debit is denied."
+msgstr "Factuur '%s': Incasso geweigerd"
+
+#. module: account_direct_debit
+#: code:addons/account_direct_debit/model/payment_line.py:141
+#, python-format
+msgid "Cancelation of payment line '%s' has already been processed"
+msgstr "Het annuleren van de betaalopdrachtregel '%s' is al verwerkt"
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_payment_order_create
+msgid "payment.order.create"
+msgstr "payment.order.create"
+
+#. module: account_direct_debit
+#: field:payment.line,storno:0
+msgid "Storno"
+msgstr "Storno"
+
+#. module: account_direct_debit
+#: help:payment.line,storno:0
+msgid ""
+"If this is true, the debit order has been canceled by the bank or by the "
+"customer"
+msgstr ""
+"Indien aangevinkt is de incasso opdracht al geannuleerd dor de bank of de "
+"klant."
+
+#. module: account_direct_debit
+#: model:ir.actions.act_window,help:account_direct_debit.action_debit_order_tree
+msgid ""
+"A debit order is a debit request from your company to collect customer "
+"invoices. Here you can register all debit orders that should be done, keep "
+"track of all debit orders and mention the invoice reference and the partner "
+"the withdrawal should be done for."
+msgstr ""
+"Een incasso opdracht is een opdracht van uw bedrijf aan uw klant voor het "
+"incasseren van openstaande posten. Hier kunt u alle incasso opdrachten "
+"invoeren die moeten worden uitgevoerd en overzicht houden op alle incasso "
+"opdrachten. Tevens voert u hier de factuurreferentie en klant in waar de "
+"afschrijving moet plaatsvinden."
+
+#. module: account_direct_debit
+#: field:account.move.line,amount_to_receive:0
+msgid "Amount to receive"
+msgstr "Bedrag te ontvangen"
+
+#. module: account_direct_debit
+#: model:ir.model,name:account_direct_debit.model_account_invoice
+msgid "Invoice"
+msgstr "Factuur"

=== added directory 'account_payment_direct_debit/migrations'
=== added directory 'account_payment_direct_debit/migrations/7.0.2'
=== added file 'account_payment_direct_debit/migrations/7.0.2/post-migration.py'
--- account_payment_direct_debit/migrations/7.0.2/post-migration.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/migrations/7.0.2/post-migration.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,38 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2013 Therp BV (<http://therp.nl>).
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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/>.
+#
+##############################################################################
+
+def migrate(cr, version):
+    if not version:
+        return
+    cr.execute(
+        """
+        UPDATE payment_line
+        SET transit_move_line_id = banking_addons_61_debit_move_line_id
+        """)
+    cr.execute(
+        """
+        ALTER TABLE "payment_line"
+        DROP COLUMN "banking_addons_61_debit_move_line_id"
+        """
+        )

=== added file 'account_payment_direct_debit/migrations/7.0.2/pre-migration.py'
--- account_payment_direct_debit/migrations/7.0.2/pre-migration.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/migrations/7.0.2/pre-migration.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2013 Therp BV (<http://therp.nl>).
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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/>.
+#
+##############################################################################
+
+import logging
+logger = logging.getLogger()
+
+def rename_columns(cr, column_spec):
+    """
+    Rename table columns. Taken from OpenUpgrade.
+
+    :param column_spec: a hash with table keys, with lists of tuples as values. \
+    Tuples consist of (old_name, new_name).
+
+    """
+    for table in column_spec.keys():
+        for (old, new) in column_spec[table]:
+            logger.info("table %s, column %s: renaming to %s",
+                     table, old, new)
+            cr.execute('ALTER TABLE "%s" RENAME "%s" TO "%s"' % (table, old, new,))
+            cr.execute('DROP INDEX IF EXISTS "%s_%s_index"' % (table, old))
+
+def migrate(cr, version):
+    if not version:
+        return
+
+    # rename field debit_move_line_id
+    rename_columns(cr, {
+            'payment_line': [
+                ('debit_move_line_id', 'banking_addons_61_debit_move_line_id'),
+                ]})

=== added directory 'account_payment_direct_debit/model'
=== added file 'account_payment_direct_debit/model/__init__.py'
--- account_payment_direct_debit/model/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/model/__init__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,6 @@
+import account_payment
+import payment_line
+import account_move_line
+import account_invoice
+import payment_order_create
+import payment_type

=== added file 'account_payment_direct_debit/model/account_invoice.py'
--- account_payment_direct_debit/model/account_invoice.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/model/account_invoice.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,164 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2011 - 2013 Therp BV (<http://therp.nl>).
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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
+from openerp.tools.translate import _
+
+"""
+This module adds support for Direct debit orders as applicable
+in the Netherlands. Debit orders are advanced in total by the bank.
+Amounts that cannot be debited or are canceled by account owners are
+credited afterwards. Such a creditation is called a storno.
+
+Invoice workflow:
+
+1 the sale leads to 
+   1300 Debtors 100
+   8000 Sales       100
+
+Balance: 
+  Debtors  2000 | 
+  Sales        | 2000
+
+2 an external booking takes place
+   1100 Bank    100
+   1300 Debtors     100
+   This booking is reconciled with [1]
+   The invoice gets set to state 'paid', and 'reconciled' = True
+
+Balance:
+   Debtors 1900 |
+   Bank     100 |
+   Sales        | 2000
+
+This module implements the following diversion:
+
+2a the invoice is included in a direct debit order. When the order is
+   confirmed, a move is created per invoice:
+
+   2000 Transfer account 100 |
+   1300 Debtors              | 100
+   Reconciliation takes place between 1 and 2a. 
+   The invoice gets set to state 'paid', and 'reconciled' = True
+
+Balance:
+   Debtors             0 |  
+   Transfer account 2000 |
+   Bank                0 |
+   Sales                 | 2000
+
+3a the direct debit order is booked on the bank account
+
+Balance:
+  1100 Bank             2000 |
+  2000 Transfer account      | 2000
+  Reconciliation takes place between 3a and 2a
+
+Balance:
+   Debtors             0 |  
+   Transfer account    0 |
+   Bank             2000 |
+   Sales                 | 2000
+
+4 a storno from invoice [1] triggers a new booking on the bank account
+  1300 Debtors 100 |
+  1100 Bank        | 100
+  
+Balance:
+   Debtors           100 |  
+   Transfer account    0 |
+   Bank             1900 |
+   Sales                 | 2000
+
+   The reconciliation of 2a is undone. The booking of 2a is reconciled 
+   with the booking of 4 instead.
+   The payment line attribute 'storno' is set to True and the invoice
+   state is no longer 'paid'.
+
+Two cases need to be distinguisted:
+   1) If the storno is a manual storno from the partner, the invoice is set to
+      state 'debit_denied', with 'reconciled' = False 
+      This module implements this option by allowing the bank module to call
+     
+          netsvc.LocalService("workflow").trg_validate(
+              uid, 'account.invoice', ids, 'debit_denied', cr)
+
+   2) If the storno is an error generated by the bank (assumingly non-fatal),
+      the invoice is reopened for the next debit run. This is a call to existing
+     
+         netsvc.LocalService("workflow").trg_validate(
+             uid, 'account.invoice', ids, 'open_test', cr)
+
+      Should also be adding a log entry on the invoice for tracing purposes
+
+         self._log_event(cr, uid, ids, -1.0, 'Debit denied')           
+
+      If not for that funny comment
+      "#TODO: implement messages system"  in account/invoice.py
+
+   Repeating non-fatal fatal errors need to be dealt with manually by checking
+   open invoices with a matured invoice- or due date.
+""" 
+
+class account_invoice(orm.Model):
+    _inherit = "account.invoice"
+
+    def __init__(self, pool, cr):
+        """ 
+        Adding a state to the hardcoded state list of the inherited
+        model. The alternative is duplicating the field definition 
+        in columns but only one module can do that!
+
+        Maybe apply a similar trick when overriding the buttons' 'states' attributes
+        in the form view, manipulating the xml in fields_view_get().
+        """ 
+        super(account_invoice, self).__init__(pool, cr)
+        invoice_obj = pool.get('account.invoice')
+        invoice_obj._columns['state'].selection.append(
+            ('debit_denied', 'Debit denied'))
+
+    def action_debit_denied(self, cr, uid, ids, context=None):
+        for invoice_id in ids:
+            if self.test_paid(cr, uid, [invoice_id], context):
+                number = self.read(
+                    cr, uid, invoice_id, ['number'], context=context)['number']
+                raise orm.except_orm(
+                    _('Error !'), 
+                    _('You cannot set invoice \'%s\' to state \'debit denied\', ' +
+                      'as it is still reconciled.') % number)
+        self.write(cr, uid, ids, {'state': 'debit_denied'}, context=context)
+        for inv_id, name in self.name_get(cr, uid, ids, context=context):
+            message = _("Invoice '%s': direct debit is denied.") % name
+            self.log(cr, uid, inv_id, message)
+        return True
+
+    def test_undo_debit_denied(self, cr, uid, ids, context=None):
+        """ 
+        Called from the workflow. Used to unset paid state on
+        invoices that were paid with bank transfers which are being cancelled 
+        """
+        for invoice in self.read(cr, uid, ids, ['reconciled'], context):
+            if not invoice['reconciled']:
+                return False
+        return True

=== added file 'account_payment_direct_debit/model/account_move_line.py'
--- account_payment_direct_debit/model/account_move_line.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/model/account_move_line.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,127 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This module (C) 2011 - 2013 Therp BV (<http://therp.nl>).
+#                (C) 2011 Smile Benelux (<http://smile.fr>).
+#
+#    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 operator import itemgetter
+from openerp.osv import fields, orm
+
+class account_move_line(orm.Model):
+    _inherit = "account.move.line"
+
+    def amount_to_receive(self, cr, uid, ids, name, arg={}, context=None):
+        """ 
+        Return the amount still to receive regarding all the debit orders
+        (excepting canceled orders).
+        This is the reverse from amount_to_pay() in
+        account_payment/account_move_line.py
+        """
+        if not ids:
+            return {}
+        cr.execute("""SELECT ml.id,
+                    CASE WHEN ml.amount_currency > 0
+                        THEN ml.amount_currency
+                        ELSE ml.debit
+                    END -
+                    (SELECT coalesce(sum(amount_currency),0)
+                        FROM payment_line pl
+                            INNER JOIN payment_order po
+                                ON (pl.order_id = po.id)
+                        WHERE move_line_id = ml.id
+                        AND pl.storno is false
+                        AND po.state != 'cancel') AS amount
+                    FROM account_move_line ml
+                    WHERE id IN %s""", (tuple(ids),))
+        r = dict(cr.fetchall())
+        return r
+
+    def _to_receive_search(self, cr, uid, obj, name, args, context=None):
+        """
+        Reverse of account_payment/account_move_line.py:_to_pay_search()
+        """
+        if not args:
+            return []
+        line_obj = self.pool.get('account.move.line')
+        query = line_obj._query_get(cr, uid, context=context)
+        where = ' and '.join(map(lambda x: '''(SELECT
+        CASE WHEN l.amount_currency > 0
+            THEN l.amount_currency
+            ELSE l.debit
+        END - coalesce(sum(pl.amount_currency), 0)
+        FROM payment_line pl
+        INNER JOIN payment_order po ON (pl.order_id = po.id)
+        WHERE move_line_id = l.id
+        AND pl.storno is false
+        AND po.state != 'cancel'
+        ) %(operator)s %%s ''' % {'operator': x[1]}, args))
+        sql_args = tuple(map(itemgetter(2), args))
+
+        cr.execute(('''SELECT id
+            FROM account_move_line l
+            WHERE account_id IN (select id
+                FROM account_account
+                WHERE type=%s AND active)
+            AND reconcile_id IS null
+            AND debit > 0
+            AND ''' + where + ' and ' + query), ('receivable',)+sql_args )
+
+        res = cr.fetchall()
+        if not res:
+            return [('id', '=', '0')]
+        return [('id', 'in', map(lambda x:x[0], res))]
+
+    def line2bank(self, cr, uid, ids, payment_mode_id=None, context=None):
+        '''I have to inherit this function for direct debits to fix the
+        following issue : if the customer invoice has a value for
+        'partner_bank_id', then it will take this partner_bank_id
+        in the payment line... but, on a customer invoice,
+        the partner_bank_id is the bank account of the company,
+        not the bank account of the customer !
+        '''
+        if context is None:
+            context = {}
+        pay_mode_obj = self.pool['payment.mode']
+        payment_mode_id = (
+            payment_mode_id or context.get('_fix_payment_mode_id'))
+        print payment_mode_id
+        if payment_mode_id:
+            pay_mode = pay_mode_obj.browse(
+                cr, uid, payment_mode_id, context=context)
+            if pay_mode.type.payment_order_type == 'debit':
+                line2bank = {}
+                bank_type = pay_mode_obj.suitable_bank_types(
+                    cr, uid, payment_mode_id, context=context)
+                for line in self.browse(cr, uid, ids, context=context):
+                    line2bank[line.id] = False
+                    if line.partner_id:
+                        for bank in line.partner_id.bank_ids:
+                            if bank.state in bank_type:
+                                line2bank[line.id] = bank.id
+                                break
+                return line2bank
+        return super(account_move_line, self).line2bank(
+            cr, uid, ids, payment_mode_id, context=context)
+
+    _columns = {
+        'amount_to_receive': fields.function(
+            amount_to_receive, method=True,
+            type='float', string='Amount to receive',
+            fnct_search=_to_receive_search),
+        }

=== added file 'account_payment_direct_debit/model/account_payment.py'
--- account_payment_direct_debit/model/account_payment.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/model/account_payment.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+from openerp.osv import orm, fields
+import netsvc
+from tools.translate import _
+
+class payment_order(orm.Model):
+    _inherit = 'payment.order'
+
+    def test_undo_done(self, cr, uid, ids, context=None):
+        """ 
+        Called from the workflow. Used to unset done state on
+        payment orders that were reconciled with bank transfers
+        which are being cancelled 
+        """
+        for order in self.browse(cr, uid, ids, context=context):
+            if order.type == 'receivable':
+                for line in order.line_ids:
+                    if line.storno:
+                        return False
+        return super(payment_order, self).test_undo_done(
+            cr, uid, ids, context=context)

=== added file 'account_payment_direct_debit/model/payment_line.py'
--- account_payment_direct_debit/model/payment_line.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/model/payment_line.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,152 @@
+# -*- coding: utf-8 -*-
+from openerp.osv import orm, fields
+import netsvc
+from tools.translate import _
+
+class payment_line(orm.Model):
+    _inherit = 'payment.line'
+
+    def debit_storno(self, cr, uid, payment_line_id, amount,
+                     currency, storno_retry=True, context=None):
+        """
+        The processing of a storno is triggered by a debit
+        transfer on one of the company's bank accounts.
+        This method offers to re-reconcile the original debit
+        payment. For this purpose, we have registered that
+        payment move on the payment line.
+
+        Return the (now incomplete) reconcile id. The caller MUST
+        re-reconcile this reconcile with the bank transfer and
+        re-open the associated invoice.
+
+        :param payment_line_id: the single payment line id
+        :param amount: the (signed) amount debited from the bank account
+        :param currency: the bank account's currency *browse object*
+        :param boolean storno_retry: when True, attempt to reopen the invoice, \
+        set the invoice to 'Debit denied' otherwise.
+        :return: an incomplete reconcile for the caller to fill
+        :rtype: database id of an account.move.reconcile resource.
+        """
+
+        move_line_obj = self.pool.get('account.move.line')
+        reconcile_obj = self.pool.get('account.move.reconcile')
+        line = self.browse(cr, uid, payment_line_id)
+        reconcile_id = False
+        if (line.transit_move_line_id and not line.storno and
+            self.pool.get('res.currency').is_zero(
+                cr, uid, currency, (
+                    (line.transit_move_line_id.credit or 0.0) -
+                    (line.transit_move_line_id.debit or 0.0) + amount))):
+            # Two different cases, full and partial
+            # Both cases differ subtly in the procedure to follow
+            # Needs refractoring, but why is this not in the OpenERP API?
+            # Actually, given the nature of a direct debit order and storno,
+            # we should not need to take partial into account on the side of
+            # the transit_move_line.
+            if line.transit_move_line_id.reconcile_partial_id:
+                reconcile_id = line.transit_move_line_id.reconcile_partial_id.id
+                attribute = 'reconcile_partial_id'
+                if len(line.transit_move_line_id.reconcile_id.line_partial_ids) == 2:
+                    # reuse the simple reconcile for the storno transfer
+                    reconcile_obj.write(
+                        cr, uid, reconcile_id, {
+                            'line_id': [(6, 0, line.transit_move_line_id.id)],
+                            'line_partial_ids': [(6, 0, [])],
+                            }, context=context)
+                else:
+                    # split up the original reconcile in a partial one
+                    # and a new one for reconciling the storno transfer
+                    reconcile_obj.write(
+                        cr, uid, reconcile_id, {
+                            'line_partial_ids': [(3, line.transit_move_line_id.id)],
+                            }, context=context)
+                    reconcile_id = reconcile_obj.create(
+                        cr, uid, {
+                            'type': 'auto',
+                            'line_id': [(6, 0, line.transit_move_line_id.id)],
+                            }, context=context)
+            elif line.transit_move_line_id.reconcile_id:
+                reconcile_id = line.transit_move_line_id.reconcile_id.id
+                if len(line.transit_move_line_id.reconcile_id.line_id) == 2:
+                    # reuse the simple reconcile for the storno transfer
+                    reconcile_obj.write(
+                        cr, uid, reconcile_id, {
+                            'line_id': [(6, 0, [line.transit_move_line_id.id])]
+                            }, context=context)
+                else:
+                    # split up the original reconcile in a partial one
+                    # and a new one for reconciling the storno transfer
+                    partial_ids = [ 
+                        x.id for x in line.transit_move_line_id.reconcile_id.line_id
+                        if x.id != line.transit_move_line_id.id
+                        ]
+                    reconcile_obj.write(
+                        cr, uid, reconcile_id, {
+                            'line_partial_ids': [(6, 0, partial_ids)],
+                            'line_id': [(6, 0, [])],
+                            }, context=context)
+                    reconcile_id = reconcile_obj.create(
+                        cr, uid, {
+                            'type': 'auto',
+                            'line_id': [(6, 0, line.transit_move_line_id.id)],
+                            }, context=context)
+            # mark the payment line for storno processed
+            if reconcile_id:
+                self.write(cr, uid, [payment_line_id],
+                           {'storno': True}, context=context)
+                # put forth the invoice workflow
+                if line.move_line_id.invoice:
+                    activity = (storno_retry and 'open_test'
+                                or 'invoice_debit_denied')
+                    netsvc.LocalService("workflow").trg_validate(
+                        uid, 'account.invoice', line.move_line_id.invoice.id,
+                        activity, cr)
+        return reconcile_id
+
+    def get_storno_account_id(self, cr, uid, payment_line_id, amount,
+                     currency, context=None):
+        """
+        Check the match of the arguments, and return the account associated
+        with the storno.
+        Used in account_banking interactive mode
+
+        :param payment_line_id: the single payment line id
+        :param amount: the (signed) amount debited from the bank account
+        :param currency: the bank account's currency *browse object*
+        :return: an account if there is a full match, False otherwise
+        :rtype: database id of an account.account resource.
+        """
+
+        line = self.browse(cr, uid, payment_line_id)
+        account_id = False
+        if (line.transit_move_line_id and not line.storno and
+            self.pool.get('res.currency').is_zero(
+                cr, uid, currency, (
+                    (line.transit_move_line_id.credit or 0.0) -
+                    (line.transit_move_line_id.debit or 0.0) + amount))):
+            account_id = line.transit_move_line_id.account_id.id
+        return account_id
+
+    def debit_reconcile(self, cr, uid, payment_line_id, context=None):
+        """
+        Raise if a payment line is passed for which storno is True
+        """
+        if isinstance(payment_line_id, (list, tuple)):
+            payment_line_id = payment_line_id[0]
+        payment_line_vals = self.read(
+            cr, uid, payment_line_id, ['storno', 'name'], context=context)
+        if payment_line_vals['storno']:
+            raise orm.except_orm(
+                _('Can not reconcile'),
+                _('Cancelation of payment line \'%s\' has already been '
+                  'processed') % payment_line_vals['name'])
+        return super(payment_line, self).debit_reconcile(
+            cr, uid, payment_line_id, context=context)
+
+    _columns = {
+        'storno': fields.boolean(
+            'Storno',
+            readonly=True,
+            help=("If this is true, the debit order has been canceled "
+                  "by the bank or by the customer")),
+        }

=== added file 'account_payment_direct_debit/model/payment_order_create.py'
--- account_payment_direct_debit/model/payment_order_create.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/model/payment_order_create.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2013 Therp BV (<http://therp.nl>).
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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
+
+
+class payment_order_create(orm.TransientModel):
+    _inherit = 'payment.order.create'
+
+    def extend_payment_order_domain(
+            self, cr, uid, payment_order, domain, context=None):
+        super(payment_order_create, self).extend_payment_order_domain(
+            cr, uid, payment_order, domain, context=context)
+        if payment_order.type == 'receivable':
+            domain += [
+                ('account_id.type', '=', 'receivable'),
+                ('invoice.state', '!=', 'debit_denied'),
+                ('amount_to_receive', '>', 0),
+                ]
+        return True

=== added file 'account_payment_direct_debit/model/payment_type.py'
--- account_payment_direct_debit/model/payment_type.py	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/model/payment_type.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
+#              (C) 2011 - 2013 Therp BV (<http://therp.nl>).
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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_type(orm.Model):
+    _inherit = 'payment.type'
+
+    _columns = {
+        'payment_order_type': fields.selection(
+            [('payment', 'Payment'),('debit', 'Direct debit')],
+            'Payment order type', required=True,
+            ),
+    }
+
+    _defaults = {
+        'payment_order_type': 'payment',
+        }

=== added directory 'account_payment_direct_debit/view'
=== added file 'account_payment_direct_debit/view/account_invoice.xml'
--- account_payment_direct_debit/view/account_invoice.xml	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/view/account_invoice.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="invoice_form" model="ir.ui.view">
+            <field name="name">account.invoice.form</field>
+            <field name="model">account.invoice</field>
+            <field name="inherit_id" ref="account.invoice_form"/>
+            <field name="arch" type="xml">
+                <data>
+                    <!-- 
+                         Add new state 'debit_denied' to applicable buttons.
+                         Maybe apply trick in fields_view_get instead, for
+                         better compatibility with other modules?
+                    -->
+                    <!-- button name="invoice_open" position="attributes">
+                        <attribute name="states">draft,proforma2,debit_denied</attribute>
+                    </button -->
+                    <button name="invoice_open" position="after">
+                        <button name="invoice_debit_denied" states="paid"
+                                string="Debit Denied" icon="gtk-cancel"/>
+                    </button>
+               </data>
+            </field>
+        </record>
+        <record id="view_account_invoice_filter" model="ir.ui.view">
+            <field name="name">account.invoice.select direct debit</field>
+            <field name="model">account.invoice</field>
+            <field name="type">search</field>
+            <field name="inherit_id" ref="account.view_account_invoice_filter"/>
+            <field name="arch" type="xml">
+                <filter name="invoices" position="after">
+                    <filter name="debit_denied" icon="terp-dolar_ok!"
+                            string="Debit denied"
+                            domain="[('state','=','debit_denied')]"
+                            help="Show only invoices with state Debit denied"
+                            />
+                </filter>
+            </field>
+        </record>
+    </data>
+</openerp>

=== added file 'account_payment_direct_debit/view/account_payment.xml'
--- account_payment_direct_debit/view/account_payment.xml	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/view/account_payment.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <!-- distinguish between payment orders and debit orders in the menu 
+        <record id="account_payment.action_payment_order_tree" model="ir.actions.act_window">
+            <field name="domain">[('type', '=', 'payable')]</field>
+            <field name="context">{'search_type': 'payable'}</field>
+        </record>
+
+        <record id="action_debit_order_tree" model="ir.actions.act_window">
+            <field name="name">Direct Debit Orders</field>
+            <field name="res_model">payment.order</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="context">{'search_type': 'receivable',
+                                   'default_type': 'receivable'}</field>
+            <field name="search_view_id" ref="account_payment.view_payment_order_search"/>
+            <field name="domain">[('type', '=', 'receivable')]</field>
+            <field name="help">A debit order is a debit request from your company to collect customer invoices. Here you can register all debit orders that should be done, keep track of all debit orders and mention the invoice reference and the partner the withdrawal should be done for.</field>
+        </record>
+        
+        <menuitem action="action_debit_order_tree" id="menu_action_debit_order_form" parent="account_payment.menu_main_payment" sequence="4"/>-->
+
+        <!--<record id="view_payment_order_form" model="ir.ui.view">
+            <field name="name">payment.order.form</field>
+            <field name="model">payment.order</field>
+            <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
+            <field name="priority" eval="60"/>
+            <field name="arch" type="xml">
+                <data>
+                    <field name="reference" position="after">
+                        <field name="payment_order_type"/>
+                    </field>
+                    <xpath expr="//button[@string='Select Invoices to Pay']"
+                           position="attributes">
+                        <attribute name="attrs">
+                            {'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', 'payment')]}
+                        </attribute>
+                    </xpath>
+                    <xpath expr="//button[@string='Select Invoices to Pay']"
+                           position="after">
+                        <button colspan="2" name="%(account_payment.action_create_payment_order)s"
+                                string="Select Invoices to Collect" type="action" 
+                                attrs="{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', 'debit')]}"
+                                icon="gtk-find"
+                                />
+                    </xpath>
+                    <field name="mode" position="attributes">
+                        <attribute name="domain">[('payment_order_type', '=', payment_order_type)]</attribute>
+                    </field>
+                </data>
+            </field>
+        </record>-->
+
+        <record id="view_payment_line_tree" model="ir.ui.view">
+            <field name="name">Payment Lines</field>
+            <field name="model">payment.line</field>
+            <field name="inherit_id" ref="account_payment.view_payment_line_tree"/>
+            <field eval="4" name="priority"/>
+            <field name="arch" type="xml">
+                <field name="name" position="after">
+                    <field name="storno"/>
+                </field>
+            </field>
+        </record>
+
+    </data>
+</openerp>

=== added file 'account_payment_direct_debit/view/payment_type.xml'
--- account_payment_direct_debit/view/payment_type.xml	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/view/payment_type.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <record model="ir.ui.view" id="view_payment_type_form_inherit">
+            <field name="name">view.payment.type.form</field>
+            <field name="model">payment.type</field>
+            <field name="inherit_id" ref="account_payment_extension.view_payment_type_form"/>
+            <field name="arch" type="xml">
+                <field name="suitable_bank_types" position="after">    
+                    <field name="payment_order_type"/>
+                </field>
+            </field>
+        </record>
+
+    </data>
+</openerp>

=== added directory 'account_payment_direct_debit/workflow'
=== added file 'account_payment_direct_debit/workflow/account_invoice.xml'
--- account_payment_direct_debit/workflow/account_invoice.xml	1970-01-01 00:00:00 +0000
+++ account_payment_direct_debit/workflow/account_invoice.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="act_debit_denied" model="workflow.activity">
+            <field name="wkf_id" ref="account.wkf"/>
+            <field name="name">debit_denied</field>
+            <field name="action">action_debit_denied()</field>
+            <field name="kind">function</field>
+        </record>
+       <record id="paid_to_debit_denied" model="workflow.transition">
+            <!-- 
+                 Set an invoice to state debit denied, either manually
+                 or by confirming a bank statement line that constitutes
+                 a fatal storno
+            -->
+            <field name="act_from" ref="account.act_paid"/>
+            <field name="act_to" ref="act_debit_denied"/>
+            <field name="signal">invoice_debit_denied</field>
+        </record>
+       <record id="open_test_to_debit_denied" model="workflow.transition">
+            <!-- 
+                 A storno leads to unreconciling the move line, which
+                 reopens the invoice. We need to allow a transition from
+                 this state to the debit denied state if the storno is fatal.
+            -->
+            <field name="act_from" ref="account.act_open_test"/>
+            <field name="act_to" ref="act_debit_denied"/>
+            <field name="signal">invoice_debit_denied</field>
+        </record>
+       <record id="debit_denied_to_paid" model="workflow.transition">
+            <!-- 
+                 Cancel a bank statement line that constitutes a fatal
+                 storno
+            -->
+            <field name="act_from" ref="act_debit_denied"/>
+            <field name="act_to" ref="account.act_paid"/>
+            <field name="condition">test_undo_debit_denied()</field>
+            <field name="signal">undo_debit_denied</field>
+        </record>
+        <record id="debit_denied_to_open" model="workflow.transition">
+            <!-- 
+                 Allow the user to manually reset a debit denied status
+                 on a paid invoice (but only after manually unreconciling
+                 the invoice)
+            -->
+            <field name="act_from" ref="act_debit_denied"/>
+            <field name="act_to" ref="account.act_open_test"/>
+            <field name="signal">open_test</field>
+        </record>
+    </data>
+</openerp>

=== added directory 'account_payment_export'
=== added file 'account_payment_export/__init__.py'
--- account_payment_export/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_export/__init__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,1 @@
+from . import model
\ No newline at end of file

=== added file 'account_payment_export/__openerp__.py'
--- account_payment_export/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_payment_export/__openerp__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,62 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
+#              (C) 2011 - 2013 Therp BV (<http://therp.nl>).
+#    Copyright (C) 2014 Acysos S.L. (<http://acysos.com>).
+#    @author: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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 Payment - Payments Export Infrastructure',
+    'version': '0.1.164',
+    'license': 'AGPL-3',
+    'author': 'Account Payment community',
+    'website': 'https://launchpad.net/account-payment',
+    'category': 'Banking addons',
+    'depends': [
+        'account_payment',
+        'account_payment_extension',
+        'base_iban',  # for manual_bank_tranfer
+        ],
+    'data': [
+        'view/account_payment.xml',
+        'view/bank_payment_manual.xml',
+        'view/payment_mode.xml',
+        'data/payment_type.xml',
+    ],
+    'description': '''
+        Infrastructure to export payment orders.
+
+        This technical module provides the base infrastructure to export 
+        payment orders for electronic banking. It provides the following
+        technical features:
+        * a new payment.mode.type model
+        * payment.mode now has a mandatory type
+        * a better implementation of payment_mode.suitable_bank_types() based on payment.mode.type
+        * the "make payment" button launches a wizard depending on the payment.mode.type
+        * a manual payment mode type is provided as an example, with a default "do nothing" wizard
+        
+        Adapted to account_payment_extension by Acysos S.L. <info@xxxxxxxxxx>
+    ''',
+    'auto_install': True,
+    'installable': True,
+}

=== added directory 'account_payment_export/data'
=== added file 'account_payment_export/data/payment_type.xml'
--- account_payment_export/data/payment_type.xml	1970-01-01 00:00:00 +0000
+++ account_payment_export/data/payment_type.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <!-- Add manual bank transfer as default payment option -->
+        <record model="payment.type" id="manual_bank_tranfer">
+            <field name="name">Manual Bank Transfer</field>
+            <field name="code">BANKMAN</field>
+            <field name="suitable_bank_types"
+                eval="[(6,0,[ref('base.bank_normal'),ref('base_iban.bank_iban'),])]" />
+            <field name="ir_model_id"
+                   ref="model_payment_manual"/>
+        </record>
+    </data>
+</openerp>

=== added directory 'account_payment_export/i18n'
=== added file 'account_payment_export/i18n/account_banking_payment_export.pot'
--- account_payment_export/i18n/account_banking_payment_export.pot	1970-01-01 00:00:00 +0000
+++ account_payment_export/i18n/account_banking_payment_export.pot	2014-02-09 15:13:05 +0000
@@ -0,0 +1,145 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_banking_payment_export
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-25 15:58+0000\n"
+"PO-Revision-Date: 2013-10-25 15:58+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_banking_payment_export
+#: help:payment.mode.type,name:0
+msgid "Payment Type"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_order
+msgid "Payment Order"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: view:payment.manual:0
+msgid "Please execute payment order manually, and click OK when succesfully sent."
+msgstr ""
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_mode
+msgid "Payment Mode"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: code:addons/account_banking_payment_export/model/account_payment.py:69
+#, python-format
+msgid "You can only combine payment orders of the same type"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type
+msgid "Payment Mode Type"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_account_move_line
+msgid "Journal Items"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_manual
+msgid "Send payment order(s) manually"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: field:payment.mode.type,name:0
+msgid "Name"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: help:payment.mode.type,ir_model_id:0
+msgid "Select the Payment Wizard for payments of this type. Leave empty for manual processing"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: view:payment.manual:0
+msgid "Manual payment"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: field:payment.manual,payment_order_ids:0
+msgid "Payment orders"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: code:addons/account_banking_payment_export/model/account_payment.py:52
+#, python-format
+msgid "Payment Order Export"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: help:payment.mode,type:0
+msgid "Select the Payment Type for the Payment Mode."
+msgstr ""
+
+#. module: account_banking_payment_export
+#: view:payment.order:0
+msgid "launch_wizard"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: help:payment.mode.type,code:0
+msgid "Specify the Code for Payment Type"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_order_create
+msgid "payment.order.create"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: code:addons/account_banking_payment_export/model/account_payment.py:68
+#, python-format
+msgid "Error"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: field:payment.mode.type,ir_model_id:0
+msgid "Payment wizard"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: field:payment.mode,type:0
+msgid "Payment type"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: field:payment.mode.type,code:0
+msgid "Code"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: view:payment.manual:0
+msgid "OK"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: view:payment.mode.type:0
+msgid "Payment mode"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: view:payment.manual:0
+msgid "Cancel"
+msgstr ""
+
+#. module: account_banking_payment_export
+#: field:payment.mode.type,suitable_bank_types:0
+msgid "Suitable bank types"
+msgstr ""
+

=== added file 'account_payment_export/i18n/es.po'
--- account_payment_export/i18n/es.po	1970-01-01 00:00:00 +0000
+++ account_payment_export/i18n/es.po	2014-02-09 15:13:05 +0000
@@ -0,0 +1,110 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment_export
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0-20131224-002412\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-25 11:26+0000\n"
+"PO-Revision-Date: 2014-01-25 11:26+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_payment_export
+#: field:payment.type,ir_model_id:0
+msgid "Payment wizard"
+msgstr "Asistente de pago"
+
+#. module: account_payment_export
+#: model:ir.model,name:account_payment_export.model_payment_type
+msgid "Payment type"
+msgstr "Tipo de pago"
+
+#. module: account_payment_export
+#: model:ir.model,name:account_payment_export.model_payment_order
+msgid "Payment Order"
+msgstr "Orden de pago"
+
+#. module: account_payment_export
+#: view:payment.manual:0
+msgid "OK"
+msgstr "OK"
+
+#. module: account_payment_export
+#: model:ir.model,name:account_payment_export.model_payment_manual
+msgid "Send payment order(s) manually"
+msgstr "Enviar la orden de pago manualmente"
+
+#. module: account_payment_export
+#: help:payment.type,ir_model_id:0
+msgid "Select the Payment Wizard for payments of this type. Leave empty for manual processing"
+msgstr "Seleccione el asistente de pago para los pagos de estet tipo. Deje en blanco para proceso manual"
+
+#. module: account_payment_export
+#: model:ir.model,name:account_payment_export.model_payment_mode
+msgid "Payment Mode"
+msgstr "Modo de pago"
+
+#. module: account_payment_export
+#: view:payment.manual:0
+msgid "Manual payment"
+msgstr "Pago manual"
+
+#. module: account_payment_export
+#: field:payment.manual,payment_order_ids:0
+msgid "Payment orders"
+msgstr "Ordenes de pago"
+
+#. module: account_payment_export
+#: code:addons/account_payment_export/model/account_payment.py:52
+#, python-format
+msgid "Payment Order Export"
+msgstr "Exportar orden de pago"
+
+#. module: account_payment_export
+#: model:ir.model,name:account_payment_export.model_account_move_line
+msgid "Journal Items"
+msgstr "Apuntes contables"
+
+#. module: account_payment_export
+#: view:payment.order:0
+msgid "launch_wizard"
+msgstr "lanzar_asistente"
+
+#. module: account_payment_export
+#: view:payment.manual:0
+msgid "Please execute payment order manually, and click OK when succesfully sent."
+msgstr "Por favor, ejecute la orden de pago manualmente, y pulse OK cuando sea enviada con exito."
+
+#. module: account_payment_export
+#: model:ir.model,name:account_payment_export.model_payment_order_create
+msgid "payment.order.create"
+msgstr "pago.orden.crear"
+
+#. module: account_payment_export
+#: code:addons/account_payment_export/model/account_payment.py:68
+#, python-format
+msgid "Error"
+msgstr "Error"
+
+#. module: account_payment_export
+#: view:payment.manual:0
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: account_payment_export
+#: model:payment.type,name:account_payment_export.manual_bank_tranfer
+msgid "Manual Bank Transfer"
+msgstr "Tranferencia bancaria manual"
+
+#. module: account_payment_export
+#: code:addons/account_payment_export/model/account_payment.py:69
+#, python-format
+msgid "You can only combine payment orders of the same type"
+msgstr "Solo puede combinar ordenes de pago del mismo tipo"
+

=== added file 'account_payment_export/i18n/nl.po'
--- account_payment_export/i18n/nl.po	1970-01-01 00:00:00 +0000
+++ account_payment_export/i18n/nl.po	2014-02-09 15:13:05 +0000
@@ -0,0 +1,151 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* account_banking_payment_export
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-25 15:58+0000\n"
+"PO-Revision-Date: 2013-12-03 11:49+0000\n"
+"Last-Translator: Erwin van der Ploeg (BAS Solutions) <Unknown>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-12-04 05:59+0000\n"
+"X-Generator: Launchpad (build 16861)\n"
+
+#. module: account_banking_payment_export
+#: help:payment.mode.type,name:0
+msgid "Payment Type"
+msgstr "Betaalwijze"
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_order
+msgid "Payment Order"
+msgstr "Betalingsopdracht"
+
+#. module: account_banking_payment_export
+#: view:payment.manual:0
+msgid ""
+"Please execute payment order manually, and click OK when succesfully sent."
+msgstr ""
+"Voer de betaalopdracht handmatig uit en klik OK, wanneer succesvol verzonden."
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_mode
+msgid "Payment Mode"
+msgstr "Betaalwijze"
+
+#. module: account_banking_payment_export
+#: code:addons/account_banking_payment_export/model/account_payment.py:69
+#, python-format
+msgid "You can only combine payment orders of the same type"
+msgstr "U kunt alleen betalingsopdrachten van dezelfde soort combineren"
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type
+msgid "Payment Mode Type"
+msgstr "Betaalwijze soort"
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_account_move_line
+msgid "Journal Items"
+msgstr "Boekingen"
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_manual
+msgid "Send payment order(s) manually"
+msgstr "Verzend betaalopdrachten handmatig"
+
+#. module: account_banking_payment_export
+#: field:payment.mode.type,name:0
+msgid "Name"
+msgstr "Naam"
+
+#. module: account_banking_payment_export
+#: help:payment.mode.type,ir_model_id:0
+msgid ""
+"Select the Payment Wizard for payments of this type. Leave empty for manual "
+"processing"
+msgstr ""
+"Selecteer de wizard voor het verwerken van betalingen van dit type. Laat "
+"leeg voor handmatige verwerking."
+
+#. module: account_banking_payment_export
+#: view:payment.manual:0
+msgid "Manual payment"
+msgstr "Handmatige betaling"
+
+#. module: account_banking_payment_export
+#: field:payment.manual,payment_order_ids:0
+msgid "Payment orders"
+msgstr "Betaalopdrachten"
+
+#. module: account_banking_payment_export
+#: code:addons/account_banking_payment_export/model/account_payment.py:52
+#, python-format
+msgid "Payment Order Export"
+msgstr "Betaalopdracht export"
+
+#. module: account_banking_payment_export
+#: help:payment.mode,type:0
+msgid "Select the Payment Type for the Payment Mode."
+msgstr "Selecteer het type van de betaalmodus."
+
+#. module: account_banking_payment_export
+#: view:payment.order:0
+msgid "launch_wizard"
+msgstr "launch_wizard"
+
+#. module: account_banking_payment_export
+#: help:payment.mode.type,code:0
+msgid "Specify the Code for Payment Type"
+msgstr "Geef de code op voor het betaaltype"
+
+#. module: account_banking_payment_export
+#: model:ir.model,name:account_banking_payment_export.model_payment_order_create
+msgid "payment.order.create"
+msgstr "payment.order.create"
+
+#. module: account_banking_payment_export
+#: code:addons/account_banking_payment_export/model/account_payment.py:68
+#, python-format
+msgid "Error"
+msgstr "Fout"
+
+#. module: account_banking_payment_export
+#: field:payment.mode.type,ir_model_id:0
+msgid "Payment wizard"
+msgstr "Betaalwizard"
+
+#. module: account_banking_payment_export
+#: field:payment.mode,type:0
+msgid "Payment type"
+msgstr "Betaaltype"
+
+#. module: account_banking_payment_export
+#: field:payment.mode.type,code:0
+msgid "Code"
+msgstr "Code"
+
+#. module: account_banking_payment_export
+#: view:payment.manual:0
+msgid "OK"
+msgstr "OK"
+
+#. module: account_banking_payment_export
+#: view:payment.mode.type:0
+msgid "Payment mode"
+msgstr "Betaalwijze"
+
+#. module: account_banking_payment_export
+#: view:payment.manual:0
+msgid "Cancel"
+msgstr "Annuleren"
+
+#. module: account_banking_payment_export
+#: field:payment.mode.type,suitable_bank_types:0
+msgid "Suitable bank types"
+msgstr "Geschikte banktypen"

=== added directory 'account_payment_export/model'
=== added file 'account_payment_export/model/__init__.py'
--- account_payment_export/model/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_export/model/__init__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,4 @@
+from . import account_payment
+from . import bank_payment_manual
+from . import payment_mode
+from . import payment_order_create
\ No newline at end of file

=== added file 'account_payment_export/model/account_payment.py'
--- account_payment_export/model/account_payment.py	1970-01-01 00:00:00 +0000
+++ account_payment_export/model/account_payment.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,88 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
+#              (C) 2011 - 2013 Therp BV (<http://therp.nl>).
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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 fields, orm
+from openerp.tools.translate import _
+from openerp import netsvc
+
+
+class payment_order(orm.Model):
+    _inherit = 'payment.order'
+
+    def launch_wizard(self, cr, uid, ids, context=None):
+        """
+        Search for a wizard to launch according to the type.
+        If type is manual. just confirm the order.
+        Previously (pre-v6) in account_payment/wizard/wizard_pay.py
+        """
+        if context == None:
+            context = {}
+        result = {}
+        orders = self.browse(cr, uid, ids, context)
+        order = orders[0]
+        # check if a wizard is defined for the first order
+        if order.mode.type and order.mode.type.ir_model_id:
+            context['active_ids'] = ids
+            wizard_model = order.mode.type.ir_model_id.model
+            wizard_obj = self.pool.get(wizard_model)
+            wizard_id = wizard_obj.create(cr, uid, {}, context)
+            result = {
+                'name': wizard_obj._description or _('Payment Order Export'),
+                'view_type': 'form',
+                'view_mode': 'form',
+                'res_model': wizard_model,
+                'domain': [],
+                'context': context,
+                'type': 'ir.actions.act_window',
+                'target': 'new',
+                'res_id': wizard_id,
+                'nodestroy': True,
+                }
+        else:
+            # should all be manual orders without type or wizard model
+            for order in orders[1:]:
+                if order.mode.type and order.mode.type.ir_model_id:
+                    raise orm.except_orm(
+                        _('Error'),
+                        _('You can only combine payment orders of the same type')
+                        )
+            # process manual payments
+            wf_service = netsvc.LocalService('workflow')
+            for order_id in ids:
+                wf_service.trg_validate(uid, 'payment.order', order_id, 'done', cr)
+        return result
+    
+class payment_type(orm.Model):
+    _inherit = 'payment.type'
+    
+    _columns = {
+        'ir_model_id': fields.many2one(
+            'ir.model', 'Payment wizard',
+            help=('Select the Payment Wizard for payments of this type. '
+                  'Leave empty for manual processing'),
+            domain=[('osv_memory', '=', True)],
+            ),
+    }
+    

=== added file 'account_payment_export/model/bank_payment_manual.py'
--- account_payment_export/model/bank_payment_manual.py	1970-01-01 00:00:00 +0000
+++ account_payment_export/model/bank_payment_manual.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
+#              (C) 2011 - 2013 Therp BV (<http://therp.nl>).
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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/>.
+#
+##############################################################################
+
+'''
+This module contains a single "wizard" for confirming manual
+bank transfers.
+'''
+
+from openerp.osv import orm, fields
+from openerp import netsvc
+
+
+class payment_manual(orm.TransientModel):
+    _name = 'payment.manual'
+    _description = 'Send payment order(s) manually'
+
+    _columns = {
+        'payment_order_ids': fields.many2many('payment.order',
+            'wiz_manual_payorders_rel', 'wizard_id', 'payment_order_id',
+            'Payment orders', readonly=True),
+        }
+
+    def create(self, cr, uid, vals, context=None):
+        payment_order_ids = context.get('active_ids', [])
+        vals.update({
+            'payment_order_ids': [[6, 0, payment_order_ids]],
+        })
+        return super(payment_manual, self).create(cr, uid,
+            vals, context=context)
+
+    def button_ok(self, cr, uid, ids, context=None):
+        wf_service = netsvc.LocalService('workflow')
+        for wiz in self.browse(cr, uid, ids, context=context):
+            for order_id in wiz.payment_order_ids:
+                wf_service.trg_validate(
+                    uid, 'payment.order', order_id.id, 'done', cr)
+        return {'type': 'ir.actions.act_window_close'}

=== added file 'account_payment_export/model/payment_mode.py'
--- account_payment_export/model/payment_mode.py	1970-01-01 00:00:00 +0000
+++ account_payment_export/model/payment_mode.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
+#              (C) 2011 - 2013 Therp BV (<http://therp.nl>).
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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):
+    ''' Restoring the payment type from version 5,
+    used to select the export wizard (if any) '''
+    _inherit = "payment.mode"
+
+    def suitable_bank_types(self, cr, uid, payment_mode_id=None, context=None):
+        """ Reinstates functional code for suitable bank type filtering.
+        Current code in account_payment is disfunctional.
+        """
+        res = []
+        payment_mode = self.browse(
+            cr, uid, payment_mode_id, context)
+        if (payment_mode and payment_mode.type and
+            payment_mode.type.suitable_bank_types):
+            res = [t.code for t in payment_mode.type.suitable_bank_types]
+        return res

=== added file 'account_payment_export/model/payment_order_create.py'
--- account_payment_export/model/payment_order_create.py	1970-01-01 00:00:00 +0000
+++ account_payment_export/model/payment_order_create.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2013 ACSONE SA/NV (<http://acsone.eu>);.
+#            
+#    All other contributions are (C) by their respective contributors
+#
+#    All Rights Reserved
+#
+#    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
+
+
+class payment_order_create(orm.TransientModel):
+    _inherit = 'payment.order.create'
+
+    def create_payment(self, cr, uid, ids, context=None):
+        '''This method adapts the core create_payment() 
+        to pass the payment mode to line2bank() through the context,
+        so it is in turn propagated to suitable_bank_types().
+        
+        This is necessary because the core does not propagate the payment mode to line2bank: t = None in
+        http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/account_payment/wizard/account_payment_order.py#L72
+        
+        Hack idea courtesy Stefan Rijnhart.
+        '''
+        if context is None:
+            context = {}
+        order_obj = self.pool.get('payment.order')
+        payment = order_obj.browse(cr, uid, context['active_id'], context=context)
+        context['_fix_payment_mode_id'] = payment.mode.id
+        return super(payment_order_create, self).create_payment(cr, uid, ids, context=context)
+    
+
+class account_move_line(orm.Model):
+    _inherit = 'account.move.line'
+    
+    def line2bank(self, cr, uid, ids, payment_mode_id=None, context=None):
+        '''Obtain payment_type from context, see create_payment above'''
+        if context is None:
+            context = {}
+        payment_mode_id = payment_mode_id or context.get('_fix_payment_mode_id')
+        return super(account_move_line, self).line2bank(cr, uid, ids, payment_mode_id, context=context)
+

=== added directory 'account_payment_export/view'
=== added file 'account_payment_export/view/account_payment.xml'
--- account_payment_export/view/account_payment.xml	1970-01-01 00:00:00 +0000
+++ account_payment_export/view/account_payment.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <!-- restore wizard functionality when making payments
+          -->
+
+        <record id="view_banking_payment_order_form_1" model="ir.ui.view">
+            <field name="name">account.payment.order.form.banking-1</field>
+            <field name="inherit_id" ref="account_payment.view_payment_order_form" />
+            <field name="model">payment.order</field>
+            <field name="arch" type="xml">
+                <data>
+                    <xpath expr="//button[@string='Make Payments']"
+                           position="attributes">
+                        <attribute name="name">launch_wizard</attribute>
+                    </xpath>
+                </data>
+            </field>
+        </record>
+
+    </data>
+</openerp>

=== added file 'account_payment_export/view/bank_payment_manual.xml'
--- account_payment_export/view/bank_payment_manual.xml	1970-01-01 00:00:00 +0000
+++ account_payment_export/view/bank_payment_manual.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="view_payment_manual_form" model="ir.ui.view">
+            <field name="name">Form for manual payment wizard</field>
+            <field name="model">payment.manual</field>
+            <field name="arch" type="xml">
+                <form string="Manual payment">
+                    <label string="Please execute payment order manually, and click OK when succesfully sent." colspan="4"/>
+	                <button name="button_ok" type="object" string="OK"/>
+	                <button special="cancel" string="Cancel"/>
+                </form>
+            </field>
+        </record>
+    </data>
+</openerp>

=== added file 'account_payment_export/view/payment_mode.xml'
--- account_payment_export/view/payment_mode.xml	1970-01-01 00:00:00 +0000
+++ account_payment_export/view/payment_mode.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <!-- 
+             Add the payment mode type and transfer settings
+        -->  
+        <record id="view_payment_mode_tree_inherit" model="ir.ui.view">
+            <field name="name">payment.mode.tree.inherit</field>
+            <field name="model">payment.mode</field>
+            <field name="inherit_id" ref="account_payment.view_payment_mode_tree"/>
+            <field name="arch" type="xml">
+                <field name="company_id" position="after">
+                    <field name="type"/>
+                </field>
+            </field>
+        </record>
+
+    </data>
+</openerp>

=== added directory 'account_payment_pain_base'
=== added file 'account_payment_pain_base/.directory'
--- account_payment_pain_base/.directory	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/.directory	2014-02-09 15:13:05 +0000
@@ -0,0 +1,6 @@
+[Dolphin]
+SortOrder=1
+SortRole=date
+Timestamp=2014,1,23,11,48,11
+Version=3
+ViewMode=1

=== added file 'account_payment_pain_base/__init__.py'
--- account_payment_pain_base/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/__init__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,26 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    PAIN Base module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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 . import payment_line
+from . import payment_mode
+from . import company
+from . import banking_export_pain

=== added file 'account_payment_pain_base/__openerp__.py'
--- account_payment_pain_base/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/__openerp__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,53 @@
+##############################################################################
+#
+#    PAIN base module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#    Copyright (C) 2014 Acysos S.L. (<http://acysos.com>).
+#    @author: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+#
+#    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 Payment PAIN Base Module',
+    'summary': 'Base module for PAIN file generation',
+    'version': '0.1',
+    'license': 'AGPL-3',
+    'author': 'Akretion, Noviat, Acysos',
+    'website': 'http://openerp-community-association.org/',
+    'category': 'Hidden',
+    'depends': ['account_payment_extension','account_payment_export'],
+    'external_dependencies': {
+        'python': ['unidecode', 'lxml'],
+        },
+    'data': [
+        'payment_line_view.xml',
+        'payment_mode_view.xml',
+        'company_view.xml',
+    ],
+    'description': '''
+Base module for PAIN file generation
+====================================
+
+This module contains fields and functions that are used by the module for SEPA Credit Transfer (account_banking_sepa_credit_transfer) and SEPA Direct Debit (account_banking_sepa_direct_debit). This module doesn't provide any functionnality by itself.
+
+This module is part of the banking addons: https://launchpad.net/account-payment
+
+This module was started during the Akretion-Noviat code sprint of November 21st 2013 in Epiais les Louvres (France).
+Adapted to account_payment_extension by Acysos S.L. <info@xxxxxxxxxx>
+    ''',
+    'active': False,
+    'installable': True,
+}

=== added file 'account_payment_pain_base/banking_export_pain.py'
--- account_payment_pain_base/banking_export_pain.py	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/banking_export_pain.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,439 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    PAIN Base module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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
+from openerp.tools.translate import _
+from openerp.tools.safe_eval import safe_eval
+from datetime import datetime
+from unidecode import unidecode
+from lxml import etree
+from openerp import tools
+import logging
+import base64
+
+logger = logging.getLogger(__name__)
+
+
+class banking_export_pain(orm.AbstractModel):
+    _name = 'banking.export.pain'
+
+    def _validate_iban(self, cr, uid, iban, context=None):
+        '''if IBAN is valid, returns IBAN
+        if IBAN is NOT valid, raises an error message'''
+        partner_bank_obj = self.pool.get('res.partner.bank')
+        if partner_bank_obj.is_iban_valid(cr, uid, iban, context=context):
+            return iban.replace(' ', '')
+        else:
+            raise orm.except_orm(
+                _('Error:'), _("This IBAN is not valid : %s") % iban)
+
+    def _prepare_field(
+            self, cr, uid, field_name, field_value, eval_ctx, max_size=0,
+            gen_args=None, context=None):
+        '''This function is designed to be inherited !'''
+        if gen_args is None:
+            gen_args = {}
+        assert isinstance(eval_ctx, dict), 'eval_ctx must contain a dict'
+        try:
+            value = safe_eval(field_value, eval_ctx)
+            # SEPA uses XML ; XML = UTF-8 ; UTF-8 = support for all characters
+            # But we are dealing with banks...
+            # and many banks don't want non-ASCCI characters !
+            # cf section 1.4 "Character set" of the SEPA Credit Transfer
+            # Scheme Customer-to-bank guidelines
+            if gen_args.get('convert_to_ascii'):
+                value = unidecode(value)
+                unallowed_ascii_chars = [
+                    '"', '#', '$', '%', '&', '*', ';', '<', '>', '=', '@',
+                    '[', ']', '^', '_', '`', '{', '}', '|', '~', '\\', '!']
+                for unallowed_ascii_char in unallowed_ascii_chars:
+                    value = value.replace(unallowed_ascii_char, '-')
+        except:
+            line = eval_ctx.get('line')
+            if line:
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("Cannot compute the '%s' of the Payment Line with "
+                        "reference '%s'.")
+                    % (field_name, line.name))
+            else:
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("Cannot compute the '%s'.") % field_name)
+        if not isinstance(value, (str, unicode)):
+            raise orm.except_orm(
+                _('Field type error:'),
+                _("The type of the field '%s' is %s. It should be a string "
+                    "or unicode.")
+                % (field_name, type(value)))
+        if not value:
+            raise orm.except_orm(
+                _('Error:'),
+                _("The '%s' is empty or 0. It should have a non-null value.")
+                % field_name)
+        if max_size and len(value) > max_size:
+            value = value[0:max_size]
+        return value
+
+    def _prepare_export_sepa(
+            self, cr, uid, total_amount, transactions_count, xml_string,
+            gen_args, context=None):
+        return {
+            'batch_booking': gen_args['sepa_export'].batch_booking,
+            'charge_bearer': gen_args['sepa_export'].charge_bearer,
+            'total_amount': total_amount,
+            'nb_transactions': transactions_count,
+            'file': base64.encodestring(xml_string),
+            'payment_order_ids': [(
+                6, 0, [x.id for x in gen_args['sepa_export'].payment_order_ids]
+            )],
+        }
+
+    def _validate_xml(self, cr, uid, xml_string, gen_args, context=None):
+        xsd_etree_obj = etree.parse(
+            tools.file_open(gen_args['pain_xsd_file']))
+        official_pain_schema = etree.XMLSchema(xsd_etree_obj)
+
+        try:
+            root_to_validate = etree.fromstring(xml_string)
+            official_pain_schema.assertValid(root_to_validate)
+        except Exception, e:
+            logger.warning(
+                "The XML file is invalid against the XML Schema Definition")
+            logger.warning(xml_string)
+            logger.warning(e)
+            raise orm.except_orm(
+                _('Error:'),
+                _("The generated XML file is not valid against the official "
+                    "XML Schema Definition. The generated XML file and the "
+                    "full error have been written in the server logs. Here "
+                    "is the error, which may give you an idea on the cause "
+                    "of the problem : %s")
+                % str(e))
+        return True
+
+    def finalize_sepa_file_creation(
+            self, cr, uid, ids, xml_root, total_amount, transactions_count,
+            gen_args, context=None):
+        xml_string = etree.tostring(
+            xml_root, pretty_print=True, encoding='UTF-8',
+            xml_declaration=True)
+        logger.debug(
+            "Generated SEPA XML file in format %s below"
+            % gen_args['pain_flavor'])
+        logger.debug(xml_string)
+        self._validate_xml(cr, uid, xml_string, gen_args, context=context)
+
+        file_id = gen_args['file_obj'].create(
+            cr, uid, self._prepare_export_sepa(
+                cr, uid, total_amount, transactions_count,
+                xml_string, gen_args, context=context),
+            context=context)
+
+        self.write(
+            cr, uid, ids, {
+                'file_id': file_id,
+                'state': 'finish',
+            }, context=context)
+
+        action = {
+            'name': 'SEPA File',
+            'type': 'ir.actions.act_window',
+            'view_type': 'form',
+            'view_mode': 'form,tree',
+            'res_model': self._name,
+            'res_id': ids[0],
+            'target': 'new',
+            }
+        return action
+
+    def generate_group_header_block(
+            self, cr, uid, parent_node, gen_args, context=None):
+        group_header_1_0 = etree.SubElement(parent_node, 'GrpHdr')
+        message_identification_1_1 = etree.SubElement(
+            group_header_1_0, 'MsgId')
+        message_identification_1_1.text = self._prepare_field(
+            cr, uid, 'Message Identification',
+            'sepa_export.payment_order_ids[0].reference',
+            {'sepa_export': gen_args['sepa_export']}, 35,
+            gen_args=gen_args, context=context)
+        creation_date_time_1_2 = etree.SubElement(group_header_1_0, 'CreDtTm')
+        creation_date_time_1_2.text = datetime.strftime(
+            datetime.today(), '%Y-%m-%dT%H:%M:%S')
+        if gen_args.get('pain_flavor') == 'pain.001.001.02':
+            # batch_booking is in "Group header" with pain.001.001.02
+            # and in "Payment info" in pain.001.001.03/04
+            batch_booking = etree.SubElement(group_header_1_0, 'BtchBookg')
+            batch_booking.text = \
+                str(gen_args['sepa_export'].batch_booking).lower()
+        nb_of_transactions_1_6 = etree.SubElement(
+            group_header_1_0, 'NbOfTxs')
+        control_sum_1_7 = etree.SubElement(group_header_1_0, 'CtrlSum')
+        # Grpg removed in pain.001.001.03
+        if gen_args.get('pain_flavor') == 'pain.001.001.02':
+            grouping = etree.SubElement(group_header_1_0, 'Grpg')
+            grouping.text = 'GRPD'
+        self.generate_initiating_party_block(
+            cr, uid, group_header_1_0, gen_args,
+            context=context)
+        return group_header_1_0, nb_of_transactions_1_6, control_sum_1_7
+
+    def generate_start_payment_info_block(
+            self, cr, uid, parent_node, payment_info_ident,
+            priority, local_instrument, sequence_type, requested_date,
+            eval_ctx, gen_args, context=None):
+        payment_info_2_0 = etree.SubElement(parent_node, 'PmtInf')
+        payment_info_identification_2_1 = etree.SubElement(
+            payment_info_2_0, 'PmtInfId')
+        payment_info_identification_2_1.text = self._prepare_field(
+            cr, uid, 'Payment Information Identification',
+            payment_info_ident, eval_ctx, 35,
+            gen_args=gen_args, context=context)
+        payment_method_2_2 = etree.SubElement(payment_info_2_0, 'PmtMtd')
+        payment_method_2_2.text = gen_args['payment_method']
+        if gen_args.get('pain_flavor') != 'pain.001.001.02':
+            batch_booking_2_3 = etree.SubElement(payment_info_2_0, 'BtchBookg')
+            batch_booking_2_3.text = \
+                str(gen_args['sepa_export'].batch_booking).lower()
+        # The "SEPA Customer-to-bank
+        # Implementation guidelines" for SCT and SDD says that control sum
+        # and nb_of_transactions should be present
+        # at both "group header" level and "payment info" level
+            nb_of_transactions_2_4 = etree.SubElement(
+                payment_info_2_0, 'NbOfTxs')
+            control_sum_2_5 = etree.SubElement(payment_info_2_0, 'CtrlSum')
+        payment_type_info_2_6 = etree.SubElement(
+            payment_info_2_0, 'PmtTpInf')
+        if priority:
+            instruction_priority_2_7 = etree.SubElement(
+                payment_type_info_2_6, 'InstrPrty')
+            instruction_priority_2_7.text = priority
+        service_level_2_8 = etree.SubElement(
+            payment_type_info_2_6, 'SvcLvl')
+        service_level_code_2_9 = etree.SubElement(service_level_2_8, 'Cd')
+        service_level_code_2_9.text = 'SEPA'
+        if local_instrument:
+            local_instrument_2_11 = etree.SubElement(
+                payment_type_info_2_6, 'LclInstrm')
+            local_instr_code_2_12 = etree.SubElement(
+                local_instrument_2_11, 'Cd')
+            local_instr_code_2_12.text = local_instrument
+        if sequence_type:
+            sequence_type_2_14 = etree.SubElement(
+                payment_type_info_2_6, 'SeqTp')
+            sequence_type_2_14.text = sequence_type
+
+        if gen_args['payment_method'] == 'DD':
+            request_date_tag = 'ReqdColltnDt'
+        else:
+            request_date_tag = 'ReqdExctnDt'
+        requested_date_2_17 = etree.SubElement(
+            payment_info_2_0, request_date_tag)
+        requested_date_2_17.text = requested_date
+        return payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5
+
+    def generate_initiating_party_block(
+            self, cr, uid, parent_node, gen_args, context=None):
+        my_company_name = self._prepare_field(
+            cr, uid, 'Company Name',
+            'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name',
+            {'sepa_export': gen_args['sepa_export']},
+            gen_args.get('name_maxsize'), gen_args=gen_args, context=context)
+        initiating_party_1_8 = etree.SubElement(parent_node, 'InitgPty')
+        initiating_party_name = etree.SubElement(initiating_party_1_8, 'Nm')
+        initiating_party_name.text = my_company_name
+        initiating_party_identifier = self.pool['res.company'].\
+            _get_initiating_party_identifier(
+                cr, uid,
+                gen_args['sepa_export'].payment_order_ids[0].company_id.id,
+                context=context)
+        initiating_party_issuer = gen_args['sepa_export'].\
+            payment_order_ids[0].company_id.initiating_party_issuer
+        if initiating_party_identifier and initiating_party_issuer:
+            iniparty_id = etree.SubElement(initiating_party_1_8, 'Id')
+            iniparty_org_id = etree.SubElement(iniparty_id, 'OrgId')
+            iniparty_org_other = etree.SubElement(iniparty_org_id, 'Othr')
+            iniparty_org_other_id = etree.SubElement(iniparty_org_other, 'Id')
+            iniparty_org_other_id.text = initiating_party_identifier
+            iniparty_org_other_issuer = etree.SubElement(
+                iniparty_org_other, 'Issr')
+            iniparty_org_other_issuer.text = initiating_party_issuer
+        return True
+
+    def generate_party_agent(
+            self, cr, uid, parent_node, party_type, party_type_label,
+            order, party_name, iban, bic, eval_ctx, gen_args, context=None):
+        '''Generate the piece of the XML file corresponding to BIC
+        This code is mutualized between TRF and DD'''
+        assert order in ('B', 'C'), "Order can be 'B' or 'C'"
+        try:
+            bic = self._prepare_field(
+                cr, uid, '%s BIC' % party_type_label, bic, eval_ctx,
+                gen_args=gen_args, context=context)
+            party_agent = etree.SubElement(parent_node, '%sAgt' % party_type)
+            party_agent_institution = etree.SubElement(
+                party_agent, 'FinInstnId')
+            party_agent_bic = etree.SubElement(
+                party_agent_institution, gen_args.get('bic_xml_tag'))
+            party_agent_bic.text = bic
+        except except_orm:
+            if order == 'C':
+                if iban[0:2] != gen_args['initiating_party_country_code']:
+                    raise orm.except_orm(
+                        _('Error:'),
+                        _("The bank account with IBAN '%s' of partner '%s' "
+                            "must have an associated BIC because it is a "
+                            "cross-border SEPA operation.")
+                        % (iban, party_name))
+            if order == 'B' or (
+                    order == 'C' and gen_args['payment_method'] == 'DD'):
+                party_agent = etree.SubElement(
+                    parent_node, '%sAgt' % party_type)
+                party_agent_institution = etree.SubElement(
+                    party_agent, 'FinInstnId')
+                party_agent_other = etree.SubElement(
+                    party_agent_institution, 'Othr')
+                party_agent_other_identification = etree.SubElement(
+                    party_agent_other, 'Id')
+                party_agent_other_identification.text = 'NOTPROVIDED'
+            # for Credit Transfers, in the 'C' block, if BIC is not provided,
+            # we should not put the 'Creditor Agent' block at all,
+            # as per the guidelines of the EPC
+        return True
+
+    def generate_party_block(
+            self, cr, uid, parent_node, party_type, order, name, iban, bic,
+            eval_ctx, gen_args, context=None):
+        '''Generate the piece of the XML file corresponding to Name+IBAN+BIC
+        This code is mutualized between TRF and DD'''
+        assert order in ('B', 'C'), "Order can be 'B' or 'C'"
+        if party_type == 'Cdtr':
+            party_type_label = 'Creditor'
+        elif party_type == 'Dbtr':
+            party_type_label = 'Debtor'
+        party_name = self._prepare_field(
+            cr, uid, '%s Name' % party_type_label, name, eval_ctx,
+            gen_args.get('name_maxsize'),
+            gen_args=gen_args, context=context)
+        piban = self._prepare_field(
+            cr, uid, '%s IBAN' % party_type_label, iban, eval_ctx,
+            gen_args=gen_args,
+            context=context)
+        viban = self._validate_iban(cr, uid, piban, context=context)
+        # At C level, the order is : BIC, Name, IBAN
+        # At B level, the order is : Name, IBAN, BIC
+        if order == 'B':
+            gen_args['initiating_party_country_code'] = viban[0:2]
+        elif order == 'C':
+            self.generate_party_agent(
+                cr, uid, parent_node, party_type, party_type_label,
+                order, party_name, viban, bic,
+                eval_ctx, gen_args, context=context)
+        party = etree.SubElement(parent_node, party_type)
+        party_nm = etree.SubElement(party, 'Nm')
+        party_nm.text = party_name
+        party_account = etree.SubElement(
+            parent_node, '%sAcct' % party_type)
+        party_account_id = etree.SubElement(party_account, 'Id')
+        party_account_iban = etree.SubElement(
+            party_account_id, 'IBAN')
+        party_account_iban.text = viban
+        if order == 'B':
+            self.generate_party_agent(
+                cr, uid, parent_node, party_type, party_type_label,
+                order, party_name, viban, bic,
+                eval_ctx, gen_args, context=context)
+        return True
+
+    def generate_remittance_info_block(
+            self, cr, uid, parent_node, line, gen_args, context=None):
+
+        remittance_info_2_91 = etree.SubElement(
+            parent_node, 'RmtInf')
+        if line.state == 'normal':
+            remittance_info_unstructured_2_99 = etree.SubElement(
+                remittance_info_2_91, 'Ustrd')
+            remittance_info_unstructured_2_99.text = \
+                self._prepare_field(
+                    cr, uid, 'Remittance Unstructured Information',
+                    'line.communication', {'line': line}, 140,
+                    gen_args=gen_args,
+                    context=context)
+        else:
+            if not line.struct_communication_type:
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("Missing 'Structured Communication Type' on payment "
+                        "line with reference '%s'.")
+                    % (line.name))
+            remittance_info_structured_2_100 = etree.SubElement(
+                remittance_info_2_91, 'Strd')
+            creditor_ref_information_2_120 = etree.SubElement(
+                remittance_info_structured_2_100, 'CdtrRefInf')
+            if gen_args.get('pain_flavor') == 'pain.001.001.02':
+                creditor_ref_info_type_2_121 = etree.SubElement(
+                    creditor_ref_information_2_120, 'CdtrRefTp')
+                creditor_ref_info_type_code_2_123 = etree.SubElement(
+                    creditor_ref_info_type_2_121, 'Cd')
+                creditor_ref_info_type_issuer_2_125 = etree.SubElement(
+                    creditor_ref_info_type_2_121, 'Issr')
+                creditor_reference_2_126 = etree.SubElement(
+                    creditor_ref_information_2_120, 'CdtrRef')
+            else:
+                creditor_ref_info_type_2_121 = etree.SubElement(
+                    creditor_ref_information_2_120, 'Tp')
+                creditor_ref_info_type_or_2_122 = etree.SubElement(
+                    creditor_ref_info_type_2_121, 'CdOrPrtry')
+                creditor_ref_info_type_code_2_123 = etree.SubElement(
+                    creditor_ref_info_type_or_2_122, 'Cd')
+                creditor_ref_info_type_issuer_2_125 = etree.SubElement(
+                    creditor_ref_info_type_2_121, 'Issr')
+                creditor_reference_2_126 = etree.SubElement(
+                    creditor_ref_information_2_120, 'Ref')
+
+            creditor_ref_info_type_code_2_123.text = 'SCOR'
+            creditor_ref_info_type_issuer_2_125.text = \
+                line.struct_communication_type
+            creditor_reference_2_126.text = \
+                self._prepare_field(
+                    cr, uid, 'Creditor Structured Reference',
+                    'line.communication', {'line': line}, 35,
+                    gen_args=gen_args,
+                    context=context)
+        return True
+
+    def generate_creditor_scheme_identification(
+            self, cr, uid, parent_node, identification, identification_label,
+            eval_ctx, scheme_name_proprietary, gen_args, context=None):
+        csi_id = etree.SubElement(
+            parent_node, 'Id')
+        csi_privateid = csi_id = etree.SubElement(csi_id, 'PrvtId')
+        csi_other = etree.SubElement(csi_privateid, 'Othr')
+        csi_other_id = etree.SubElement(csi_other, 'Id')
+        csi_other_id.text = self._prepare_field(
+            cr, uid, identification_label, identification, eval_ctx,
+            gen_args=gen_args, context=context)
+        csi_scheme_name = etree.SubElement(csi_other, 'SchmeNm')
+        csi_scheme_name_proprietary = etree.SubElement(
+            csi_scheme_name, 'Prtry')
+        csi_scheme_name_proprietary.text = scheme_name_proprietary
+        return True

=== added file 'account_payment_pain_base/company.py'
--- account_payment_pain_base/company.py	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/company.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,78 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    PAIN Base module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    Copyright (C) 2013 Noviat (http://www.noviat.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#    @author: Luc de Meyer (Noviat)
+#
+#    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 res_company(orm.Model):
+    _inherit = 'res.company'
+
+    _columns = {
+        'initiating_party_issuer': fields.char(
+            'Initiating Party Issuer', size=35,
+            help="This will be used as the 'Initiating Party Issuer' in the "
+            "PAIN files generated by OpenERP."),
+    }
+
+    def _get_initiating_party_identifier(
+            self, cr, uid, company_id, context=None):
+        '''The code here may be different from one country to another.
+        If you need to add support for an additionnal country, you can
+        contribute your code here or inherit this function in the
+        localization modules for your country'''
+        assert isinstance(company_id, int), 'Only one company ID'
+        company = self.browse(cr, uid, company_id, context=context)
+        company_vat = company.vat
+        party_identifier = False
+        if company_vat and company_vat[0:2].upper() in ['BE']:
+            party_identifier = company_vat[2:].replace(' ', '')
+        return party_identifier
+
+    def _initiating_party_issuer_default(self, cr, uid, context=None):
+        '''If you need to add support for an additionnal country, you can
+        add an entry in the dict "party_issuer_per_country" here
+        or inherit this function in the localization modules for
+        your country'''
+        initiating_party_issuer = ''
+        # If your country require the 'Initiating Party Issuer', you should
+        # contribute the entry for your country in the dict below
+        party_issuer_per_country = {
+            'BE': 'KBO-BCE',  # KBO-BCE = the registry of companies in Belgium
+        }
+        company_id = self._company_default_get(
+            cr, uid, 'res.company', context=context)
+        if company_id:
+            company = self.browse(cr, uid, company_id, context=context)
+            country_code = company.country_id.code
+            initiating_party_issuer = party_issuer_per_country.get(
+                country_code, '')
+        return initiating_party_issuer
+
+    def _initiating_party_issuer_def(self, cr, uid, context=None):
+        return self._initiating_party_issuer_default(
+            cr, uid, context=context)
+
+    _defaults = {
+        'initiating_party_issuer': _initiating_party_issuer_def,
+    }

=== added file 'account_payment_pain_base/company_view.xml'
--- account_payment_pain_base/company_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/company_view.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2013 Akretion (http://www.akretion.com)
+  @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+<data>
+
+<record id="view_company_form" model="ir.ui.view">
+    <field name="name">pain.group.on.res.company.form</field>
+    <field name="model">res.company</field>
+    <field name="inherit_id" ref="base.view_company_form"/>
+    <field name="arch" type="xml">
+        <page string="Configuration" position="inside">
+        	<group colspan="4">
+        		<separator string="Payment Initiation" colspan="4" />
+                <field name="initiating_party_issuer"/>
+            </group>
+        </page>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added directory 'account_payment_pain_base/i18n'
=== added file 'account_payment_pain_base/i18n/account_banking_pain_base.pot'
--- account_payment_pain_base/i18n/account_banking_pain_base.pot	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/i18n/account_banking_pain_base.pot	2014-02-09 15:13:05 +0000
@@ -0,0 +1,146 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_banking_pain_base
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-23 21:26+0000\n"
+"PO-Revision-Date: 2013-12-23 21:26+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_banking_pain_base
+#: field:res.company,initiating_party_issuer:0
+msgid "Initiating Party Issuer"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:122
+#, python-format
+msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: field:payment.line,priority:0
+msgid "Priority"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: model:ir.model,name:account_banking_pain_base.model_payment_line
+msgid "Payment Line"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: model:ir.model,name:account_banking_pain_base.model_payment_mode
+msgid "Payment Mode"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: help:res.company,initiating_party_issuer:0
+msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
+msgstr ""
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:351
+#, python-format
+msgid "Missing 'Structured Communication Type' on payment line with reference '%s'."
+msgstr ""
+
+#. module: account_banking_pain_base
+#: selection:payment.line,priority:0
+msgid "Normal"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:70
+#, python-format
+msgid "Cannot compute the '%s' of the Payment Line with reference '%s'."
+msgstr ""
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:77
+#, python-format
+msgid "Cannot compute the '%s'."
+msgstr ""
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:81
+#, python-format
+msgid "The type of the field '%s' is %s. It should be a string or unicode."
+msgstr ""
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:47
+#: code:addons/account_banking_pain_base/banking_export_pain.py:69
+#: code:addons/account_banking_pain_base/banking_export_pain.py:76
+#: code:addons/account_banking_pain_base/banking_export_pain.py:86
+#: code:addons/account_banking_pain_base/banking_export_pain.py:121
+#: code:addons/account_banking_pain_base/banking_export_pain.py:350
+#, python-format
+msgid "Error:"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: model:ir.model,name:account_banking_pain_base.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:47
+#, python-format
+msgid "This IBAN is not valid : %s"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:80
+#, python-format
+msgid "Field type error:"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: field:payment.line,struct_communication_type:0
+msgid "Structured Communication Type"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:87
+#, python-format
+msgid "The '%s' is empty or 0. It should have a non-null value."
+msgstr ""
+
+#. module: account_banking_pain_base
+#: model:ir.model,name:account_banking_pain_base.model_banking_export_pain
+msgid "banking.export.pain"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: help:payment.mode,convert_to_ascii:0
+msgid "If active, OpenERP will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file."
+msgstr ""
+
+#. module: account_banking_pain_base
+#: help:payment.line,priority:0
+msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file."
+msgstr ""
+
+#. module: account_banking_pain_base
+#: view:res.company:0
+msgid "Payment Initiation"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: selection:payment.line,priority:0
+msgid "High"
+msgstr ""
+
+#. module: account_banking_pain_base
+#: field:payment.mode,convert_to_ascii:0
+msgid "Convert to ASCII"
+msgstr ""
+

=== added file 'account_payment_pain_base/i18n/es.po'
--- account_payment_pain_base/i18n/es.po	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/i18n/es.po	2014-02-09 15:13:05 +0000
@@ -0,0 +1,153 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment_pain_base
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0-20131224-002412\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-25 11:28+0000\n"
+"PO-Revision-Date: 2014-01-25 11:28+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_payment_pain_base
+#: field:res.company,initiating_party_issuer:0
+msgid "Initiating Party Issuer"
+msgstr "Initiating Party Issuer"
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:126
+#, python-format
+msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s"
+msgstr "El archivo XML generado no es válido según el esquema oficial. El archivo XML generado y el error han sido escrito en el log del servidor. Aquí esta el error, que le puede indicar una idea del problema : %s"
+
+#. module: account_payment_pain_base
+#: field:payment.line,priority:0
+msgid "Priority"
+msgstr "Prioridad"
+
+#. module: account_payment_pain_base
+#: model:ir.model,name:account_payment_pain_base.model_payment_line
+msgid "Payment Line"
+msgstr "Línea de pago"
+
+#. module: account_payment_pain_base
+#: model:ir.model,name:account_payment_pain_base.model_payment_mode
+msgid "Payment Mode"
+msgstr "Modo de pago"
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:303
+#, python-format
+msgid "The bank account with IBAN '%s' of partner '%s' must have an associated BIC because it is a cross-border SEPA operation."
+msgstr "La cuenta bancaria con IBAN '%s' de la empresa '%s' debe tener un BIC asociado porque es una operación SEPA transfronteriza."
+
+#. module: account_payment_pain_base
+#: help:res.company,initiating_party_issuer:0
+msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
+msgstr "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
+
+#. module: account_payment_pain_base
+#: selection:payment.line,priority:0
+msgid "Normal"
+msgstr "Normal"
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:81
+#, python-format
+msgid "Cannot compute the '%s'."
+msgstr "No se puede computar el '%s'."
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:85
+#, python-format
+msgid "The type of the field '%s' is %s. It should be a string or unicode."
+msgstr "El tipo de archivo '%s' es %s. Deben ser caracteres o unicode."
+
+#. module: account_payment_pain_base
+#: model:ir.model,name:account_payment_pain_base.model_res_company
+msgid "Companies"
+msgstr "Compañías"
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:47
+#: code:addons/account_payment_pain_base/banking_export_pain.py:74
+#: code:addons/account_payment_pain_base/banking_export_pain.py:80
+#: code:addons/account_payment_pain_base/banking_export_pain.py:90
+#: code:addons/account_payment_pain_base/banking_export_pain.py:125
+#: code:addons/account_payment_pain_base/banking_export_pain.py:302
+#: code:addons/account_payment_pain_base/banking_export_pain.py:384
+#, python-format
+msgid "Error:"
+msgstr "Error:"
+
+#. module: account_payment_pain_base
+#: help:payment.line,priority:0
+msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file."
+msgstr "Este campo debe ser usuado como 'Instrucción prioritaria' en el archivo PAIN generado."
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:75
+#, python-format
+msgid "Cannot compute the '%s' of the Payment Line with reference '%s'."
+msgstr "No se puede computar el '%s' de la línea de pago '%s'."
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:47
+#, python-format
+msgid "This IBAN is not valid : %s"
+msgstr "Este IBAN no es válido : %s"
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:84
+#, python-format
+msgid "Field type error:"
+msgstr "Error en el ripo de campo:"
+
+#. module: account_payment_pain_base
+#: field:payment.line,struct_communication_type:0
+msgid "Structured Communication Type"
+msgstr "Comunicación estructurada"
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:91
+#, python-format
+msgid "The '%s' is empty or 0. It should have a non-null value."
+msgstr "Es '%s' esta vacio o es 0. Debe tener un valor no núlo."
+
+#. module: account_payment_pain_base
+#: model:ir.model,name:account_payment_pain_base.model_banking_export_pain
+msgid "banking.export.pain"
+msgstr "banking.export.pain"
+
+#. module: account_payment_pain_base
+#: help:payment.mode,convert_to_ascii:0
+msgid "If active, OpenERP will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file."
+msgstr "Si esta activo, OpenERP convertirá cada carácter acentuado en su correspondiente cáracter sin acentuar, solo se usan carácter ASCII el archivo PAIN."
+
+#. module: account_payment_pain_base
+#: view:res.company:0
+msgid "Payment Initiation"
+msgstr "Inicio de pago"
+
+#. module: account_payment_pain_base
+#: selection:payment.line,priority:0
+msgid "High"
+msgstr "Alto"
+
+#. module: account_payment_pain_base
+#: field:payment.mode,convert_to_ascii:0
+msgid "Convert to ASCII"
+msgstr "Convertir a ASCII"
+
+#. module: account_payment_pain_base
+#: code:addons/account_payment_pain_base/banking_export_pain.py:385
+#, python-format
+msgid "Missing 'Structured Communication Type' on payment line with reference '%s'."
+msgstr "'Comunicación estrecturada' no disponible en la línea de pago con referencia '%s'."
+

=== added file 'account_payment_pain_base/i18n/fr.po'
--- account_payment_pain_base/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/i18n/fr.po	2014-02-09 15:13:05 +0000
@@ -0,0 +1,146 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_banking_pain_base
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-23 21:27+0000\n"
+"PO-Revision-Date: 2013-12-23 21:27+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_banking_pain_base
+#: field:res.company,initiating_party_issuer:0
+msgid "Initiating Party Issuer"
+msgstr "Initiating Party Issuer"
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:122
+#, python-format
+msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s"
+msgstr "Le fichier XML généré n'est pas valide par rapport à la Définition du Schéma XML officiel. Le fichier XML généré et le message d'erreur complet ont été écrits dans les logs du serveur. Voici l'erreur, qui vous donnera peut-être une idée sur la cause du problème : %s"
+
+#. module: account_banking_pain_base
+#: field:payment.line,priority:0
+msgid "Priority"
+msgstr "Priorité"
+
+#. module: account_banking_pain_base
+#: model:ir.model,name:account_banking_pain_base.model_payment_line
+msgid "Payment Line"
+msgstr "Ligne de paiement"
+
+#. module: account_banking_pain_base
+#: model:ir.model,name:account_banking_pain_base.model_payment_mode
+msgid "Payment Mode"
+msgstr "Mode de paiement"
+
+#. module: account_banking_pain_base
+#: help:res.company,initiating_party_issuer:0
+msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
+msgstr "Ce champ sera le 'Initiating Party Issuer' dans les fichiers PAIN générés par OpenERP."
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:351
+#, python-format
+msgid "Missing 'Structured Communication Type' on payment line with reference '%s'."
+msgstr "Le 'Type de communication structuré' n'est pas renseigné sur la ligne de paiement ayant la référence '%s'."
+
+#. module: account_banking_pain_base
+#: selection:payment.line,priority:0
+msgid "Normal"
+msgstr "Normal"
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:70
+#, python-format
+msgid "Cannot compute the '%s' of the Payment Line with reference '%s'."
+msgstr "Impossible de calculer le '%s' de la ligne de paiement ayant la référence '%s'."
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:77
+#, python-format
+msgid "Cannot compute the '%s'."
+msgstr "Impossible de calculer le '%s'."
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:81
+#, python-format
+msgid "The type of the field '%s' is %s. It should be a string or unicode."
+msgstr "Le type du champ '%s' est %s. Il devrait être de type string ou unicode."
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:47
+#: code:addons/account_banking_pain_base/banking_export_pain.py:69
+#: code:addons/account_banking_pain_base/banking_export_pain.py:76
+#: code:addons/account_banking_pain_base/banking_export_pain.py:86
+#: code:addons/account_banking_pain_base/banking_export_pain.py:121
+#: code:addons/account_banking_pain_base/banking_export_pain.py:350
+#, python-format
+msgid "Error:"
+msgstr "Erreur :"
+
+#. module: account_banking_pain_base
+#: model:ir.model,name:account_banking_pain_base.model_res_company
+msgid "Companies"
+msgstr "Sociétés"
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:47
+#, python-format
+msgid "This IBAN is not valid : %s"
+msgstr "Cet IBAN n'est pas valide : %s"
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:80
+#, python-format
+msgid "Field type error:"
+msgstr "Erreur dans le type de champ :"
+
+#. module: account_banking_pain_base
+#: field:payment.line,struct_communication_type:0
+msgid "Structured Communication Type"
+msgstr "Type de communication structurée"
+
+#. module: account_banking_pain_base
+#: code:addons/account_banking_pain_base/banking_export_pain.py:87
+#, python-format
+msgid "The '%s' is empty or 0. It should have a non-null value."
+msgstr "Le '%s' est vide ou égal à 0. Il devrait avoir une valeur non-nulle."
+
+#. module: account_banking_pain_base
+#: model:ir.model,name:account_banking_pain_base.model_banking_export_pain
+msgid "banking.export.pain"
+msgstr "banking.export.pain"
+
+#. module: account_banking_pain_base
+#: help:payment.mode,convert_to_ascii:0
+msgid "If active, OpenERP will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file."
+msgstr "Si actif, OpenERP convertira chaque caractère accentué en son équivalent non accentué, de telle façon que seuls des caractères ASCII soient utilisés dans le fichier PAIN généré."
+
+#. module: account_banking_pain_base
+#: help:payment.line,priority:0
+msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file."
+msgstr "Ce champ sera le 'Instruction Priority' dans le fichier PAIN généré."
+
+#. module: account_banking_pain_base
+#: view:res.company:0
+msgid "Payment Initiation"
+msgstr "Payment Initiation"
+
+#. module: account_banking_pain_base
+#: selection:payment.line,priority:0
+msgid "High"
+msgstr "Élevé"
+
+#. module: account_banking_pain_base
+#: field:payment.mode,convert_to_ascii:0
+msgid "Convert to ASCII"
+msgstr "Convertir en ASCII"
+

=== added file 'account_payment_pain_base/payment_line.py'
--- account_payment_pain_base/payment_line.py	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/payment_line.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,52 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    PAIN Base module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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_line(orm.Model):
+    _inherit = 'payment.line'
+
+    def _get_struct_communication_types(self, cr, uid, context=None):
+        return [('ISO', 'ISO')]
+
+    _columns = {
+        'priority': fields.selection([
+            ('NORM', 'Normal'),
+            ('HIGH', 'High'),
+            ], 'Priority',
+            help="This field will be used as the 'Instruction Priority' in "
+            "the generated PAIN file."),
+        # Update size from 64 to 140, because PAIN allows 140 caracters
+        'communication': fields.char(
+            'Communication', size=140, required=True,
+            help="Used as the message between ordering customer and current "
+            "company. Depicts 'What do you want to say to the recipient "
+            "about this order ?'"),
+        'struct_communication_type': fields.selection(
+            _get_struct_communication_types, 'Structured Communication Type'),
+    }
+
+    _defaults = {
+        'priority': 'NORM',
+        'struct_communication_type': 'ISO',
+    }

=== added file 'account_payment_pain_base/payment_line_view.xml'
--- account_payment_pain_base/payment_line_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/payment_line_view.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2013 Akretion (http://www.akretion.com)
+  @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+<data>
+
+<record id="view_payment_line_form" model="ir.ui.view">
+    <field name="name">pain.base.payment.line.form</field>
+    <field name="model">payment.line</field>
+    <field name="inherit_id" ref="account_payment.view_payment_line_form"/>
+    <field name="arch" type="xml">
+        <field name="bank_id" position="after">
+            <field name="priority"/>
+            <newline />
+        </field>
+        <field name="state" position="after">
+            <field name="struct_communication_type" attrs="{'invisible': [('state', '!=', 'structured')], 'required': [('state', '=', 'structured')]}"/>
+        </field>
+    </field>
+</record>
+
+<record id="view_payment_order_form" model="ir.ui.view">
+    <field name="name">pain.base.payment.line.inside.order.form</field>
+    <field name="model">payment.order</field>
+    <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
+    <field name="arch" type="xml">
+        <xpath expr="//field[@name='line_ids']/form//field[@name='bank_id']" position="after">
+            <field name="priority"/>
+            <newline />
+        </xpath>
+        <xpath expr="//field[@name='line_ids']/form//field[@name='state']" position="after">
+            <field name="struct_communication_type" attrs="{'invisible': [('state', '!=', 'structured')], 'required': [('state', '=', 'structured')]}"/>
+        </xpath>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added file 'account_payment_pain_base/payment_mode.py'
--- account_payment_pain_base/payment_mode.py	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/payment_mode.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,39 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    PAIN Base module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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 = {
+        'convert_to_ascii': fields.boolean(
+            'Convert to ASCII',
+            help="If active, OpenERP will convert each accented caracter to "
+            "the corresponding unaccented caracter, so that only ASCII "
+            "caracters are used in the generated PAIN file."),
+    }
+
+    _defaults = {
+        'convert_to_ascii': True,
+    }

=== added file 'account_payment_pain_base/payment_mode_view.xml'
--- account_payment_pain_base/payment_mode_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_pain_base/payment_mode_view.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2013 Akretion (http://www.akretion.com)
+  @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+<data>
+
+<record id="view_payment_mode_form_inherit" model="ir.ui.view">
+    <field name="name">add.convert_to_ascii.in.payment.mode.form</field>
+    <field name="model">payment.mode</field>
+    <field name="inherit_id" ref="account_payment_extension.view_payment_mode_form_require_bank_account"/>
+    <field name="arch" type="xml">
+        <field name="type" position="after">
+            <field name="convert_to_ascii"/>
+        </field>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added directory 'account_payment_sepa_credit_transfer'
=== added file 'account_payment_sepa_credit_transfer/__init__.py'
--- account_payment_sepa_credit_transfer/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/__init__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,24 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    SEPA Credit Transfer module for OpenERP
+#    Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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 . import wizard
+from . import account_banking_sepa

=== added file 'account_payment_sepa_credit_transfer/__openerp__.py'
--- account_payment_sepa_credit_transfer/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/__openerp__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,55 @@
+##############################################################################
+#
+#    SEPA Credit Transfer module for OpenERP
+#    Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#    Copyright (C) 2014 Acysos S.L. (<http://acysos.com>).
+#    @author: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+#
+#    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 Payment SEPA Credit Transfer',
+    'summary': 'Create SEPA XML files for Credit Transfers',
+    'version': '0.2',
+    'license': 'AGPL-3',
+    'author': 'Akretion',
+    'website': 'http://www.akretion.com',
+    'category': 'Banking addons',
+    'depends': ['account_payment_pain_base'],
+    'external_dependencies': {
+        'python': ['unidecode', 'lxml'],
+        },
+    'data': [
+        'account_banking_sepa_view.xml',
+        'wizard/export_sepa_view.xml',
+        'data/payment_type_sepa_sct.xml',
+        'security/ir.model.access.csv',
+    ],
+    'description': '''
+Module to export payment orders in SEPA XML file format.
+
+SEPA PAIN (PAyment INitiation) is the new european standard for Customer-to-Bank payment instructions. This module implements SEPA Credit Transfer (SCT), more specifically PAIN versions 001.001.02, 001.001.03, 001.001.04 and 001.001.05. It is part of the ISO 20022 standard, available on http://www.iso20022.org.
+
+The Implementation Guidelines for SEPA Credit Transfer published by the European Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN version 001.001.03, so it's probably the version of PAIN that you should try first.
+
+This module uses the framework provided by the banking addons, cf https://launchpad.net/account-payment
+
+Please contact Alexis de Lattre from Akretion <alexis.delattre@xxxxxxxxxxxx> for any help or question about this module.
+Adapted to account_payment_extension by Acysos S.L. <info@xxxxxxxxxx>
+    ''',
+    'active': False,
+    'installable': True,
+}

=== added file 'account_payment_sepa_credit_transfer/account_banking_sepa.py'
--- account_payment_sepa_credit_transfer/account_banking_sepa.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/account_banking_sepa.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,90 @@
+##############################################################################
+#
+#    SEPA Credit Transfer module for OpenERP
+#    Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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
+from openerp.addons.decimal_precision import decimal_precision as dp
+from unidecode import unidecode
+
+
+class banking_export_sepa(orm.Model):
+    '''SEPA export'''
+    _name = 'banking.export.sepa'
+    _description = __doc__
+    _rec_name = 'filename'
+
+    def _generate_filename(self, cr, uid, ids, name, arg, context=None):
+        res = {}
+        for sepa_file in self.browse(cr, uid, ids, context=context):
+            ref = sepa_file.payment_order_ids[0].reference
+            if ref:
+                label = unidecode(ref.replace('/', '-'))
+            else:
+                label = 'error'
+            res[sepa_file.id] = 'sct_%s.xml' % label
+        return res
+
+    _columns = {
+        'payment_order_ids': fields.many2many(
+            'payment.order',
+            'account_payment_order_sepa_rel',
+            'banking_export_sepa_id', 'account_order_id',
+            'Payment Orders',
+            readonly=True),
+        'nb_transactions': fields.integer(
+            'Number of Transactions', readonly=True),
+        'total_amount': fields.float(
+            'Total Amount', digits_compute=dp.get_precision('Account'),
+            readonly=True),
+        'batch_booking': fields.boolean(
+            'Batch Booking', readonly=True,
+            help="If true, the bank statement will display only one debit "
+            "line for all the wire transfers of the SEPA XML file ; "
+            "if false, the bank statement will display one debit line "
+            "per wire transfer of the SEPA XML file."),
+        'charge_bearer': fields.selection([
+            ('SLEV', 'Following Service Level'),
+            ('SHAR', 'Shared'),
+            ('CRED', 'Borne by Creditor'),
+            ('DEBT', 'Borne by Debtor'),
+            ], 'Charge Bearer', readonly=True,
+            help="Following service level : transaction charges are to be "
+            "applied following the rules agreed in the service level and/or "
+            "scheme (SEPA Core messages must use this). Shared : "
+            "transaction charges on the creditor side are to be borne by "
+            "the creditor, transaction charges on the debtor side are to "
+            "be borne by the debtor. Borne by creditor : all transaction "
+            "charges are to be borne by the creditor. Borne by debtor : "
+            "all transaction charges are to be borne by the debtor."),
+        'create_date': fields.datetime('Generation Date', readonly=True),
+        'file': fields.binary('SEPA XML File', readonly=True),
+        'filename': fields.function(
+            _generate_filename, type='char', size=256, string='Filename',
+            readonly=True),
+        'state': fields.selection([
+            ('draft', 'Draft'),
+            ('sent', 'Sent'),
+            ('done', 'Reconciled'),
+            ], 'State', readonly=True),
+    }
+
+    _defaults = {
+        'state': 'draft',
+    }

=== added file 'account_payment_sepa_credit_transfer/account_banking_sepa_view.xml'
--- account_payment_sepa_credit_transfer/account_banking_sepa_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/account_banking_sepa_view.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
+  @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+<data>
+
+<record id="view_banking_export_sepa_form" model="ir.ui.view">
+    <field name="name">account.banking.export.sepa.form</field>
+    <field name="model">banking.export.sepa</field>
+    <field name="arch" type="xml">
+        <form string="SEPA Credit Transfer">
+            <notebook>
+                <page string="General Information">
+                    <field name="total_amount" />
+                    <field name="nb_transactions" />
+                    <field name="batch_booking" />
+                    <field name="charge_bearer"/>
+                    <field name="create_date" />
+                    <newline />
+                    <field name="file" filename="filename"/>
+                    <field name="filename" invisible="True"/>
+                </page>
+                <page string="Payment Orders">
+                    <field name="payment_order_ids" colspan="4" nolabel="1">
+                        <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment Orders">
+                            <field name="reference"/>
+                            <field name="date_created"/>
+                            <field name="date_done"/>
+                            <field name="total"/>
+                            <field name="state"/>
+                        </tree>
+                    </field>
+                </page>
+            </notebook>
+        </form>
+    </field>
+</record>
+
+
+<record id="view_banking_export_sepa_tree" model="ir.ui.view">
+    <field name="name">account.banking.export.sepa.tree</field>
+    <field name="model">banking.export.sepa</field>
+    <field name="arch" type="xml">
+        <tree string="SEPA Credit Transfer">
+            <field name="filename"/>
+            <field name="create_date"/>
+            <field name="nb_transactions"/>
+        </tree>
+    </field>
+</record>
+
+
+<record id="action_account_banking_sepa" model="ir.actions.act_window">
+    <field name="name">SEPA Credit Transfer Files</field>
+    <field name="res_model">banking.export.sepa</field>
+    <field name="view_type">form</field>
+    <field name="view_mode">tree,form</field>
+</record>
+
+
+<menuitem id="menu_account_banking_sepa"
+          parent="account_payment.menu_main_payment"
+          action="action_account_banking_sepa"
+          sequence="15"
+          />
+
+<act_window id="act_banking_export_sepa_payment_order"
+    name="SEPA Credit Transfer Files"
+    domain="[('payment_order_ids', '=', active_id)]"
+    res_model="banking.export.sepa"
+    src_model="payment.order"
+    view_type="form"
+    view_mode="tree,form"
+/>
+
+</data>
+</openerp>

=== added directory 'account_payment_sepa_credit_transfer/data'
=== added file 'account_payment_sepa_credit_transfer/data/pain.001.001.02.xsd'
--- account_payment_sepa_credit_transfer/data/pain.001.001.02.xsd	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/data/pain.001.001.02.xsd	2014-02-09 15:13:05 +0000
@@ -0,0 +1,784 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Generated by SWIFTStandards Workstation (build:R5.1.0.4) on 2006 Sep 08 11:58:39-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">
+<xs:element name="Document" type="Document"/>
+<xs:complexType name="AccountIdentification3Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="IBAN" type="IBANIdentifier"/>
+<xs:element name="BBAN" type="BBANIdentifier"/>
+<xs:element name="UPIC" type="UPICIdentifier"/>
+<xs:element name="PrtryAcct" type="SimpleIdentificationInformation2"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="AddressType2Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="ADDR"/>
+<xs:enumeration value="PBOX"/>
+<xs:enumeration value="HOME"/>
+<xs:enumeration value="BIZZ"/>
+<xs:enumeration value="MLTO"/>
+<xs:enumeration value="DLVY"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="AmountType2Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="InstdAmt" type="CurrencyAndAmount"/>
+<xs:element name="EqvtAmt" type="EquivalentAmount"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="BBANIdentifier">
+<xs:restriction base="xs:string">
+<xs:pattern value="[a-zA-Z0-9]{1,30}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="BEIIdentifier">
+<xs:restriction base="xs:string">
+<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="BICIdentifier">
+<xs:restriction base="xs:string">
+<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="BaseOneRate">
+<xs:restriction base="xs:decimal">
+<xs:fractionDigits value="10"/>
+<xs:totalDigits value="11"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="BatchBookingIndicator">
+<xs:restriction base="xs:boolean"/>
+</xs:simpleType>
+<xs:complexType name="BranchAndFinancialInstitutionIdentification3">
+<xs:sequence>
+<xs:element name="FinInstnId" type="FinancialInstitutionIdentification5Choice"/>
+<xs:element name="BrnchId" type="BranchData" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="BranchData">
+<xs:sequence>
+<xs:element name="Id" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Nm" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="CHIPSUniversalIdentifier">
+<xs:restriction base="xs:string">
+<xs:pattern value="CH[0-9]{6,6}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="CashAccount7">
+<xs:sequence>
+<xs:element name="Id" type="AccountIdentification3Choice"/>
+<xs:element name="Tp" type="CashAccountType2" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Ccy" type="CurrencyCode" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="CashAccountType2">
+<xs:sequence>
+<xs:choice>
+<xs:element name="Cd" type="CashAccountType4Code"/>
+<xs:element name="Prtry" type="Max35Text"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="CashAccountType4Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="CASH"/>
+<xs:enumeration value="CHAR"/>
+<xs:enumeration value="COMM"/>
+<xs:enumeration value="TAXE"/>
+<xs:enumeration value="CISH"/>
+<xs:enumeration value="TRAS"/>
+<xs:enumeration value="SACC"/>
+<xs:enumeration value="CACC"/>
+<xs:enumeration value="SVGS"/>
+<xs:enumeration value="ONDP"/>
+<xs:enumeration value="MGLD"/>
+<xs:enumeration value="NREX"/>
+<xs:enumeration value="MOMA"/>
+<xs:enumeration value="LOAN"/>
+<xs:enumeration value="SLRY"/>
+<xs:enumeration value="ODFT"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="ChargeBearerType1Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="DEBT"/>
+<xs:enumeration value="CRED"/>
+<xs:enumeration value="SHAR"/>
+<xs:enumeration value="SLEV"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="Cheque5">
+<xs:sequence>
+<xs:element name="ChqTp" type="ChequeType2Code" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ChqNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ChqFr" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
+<xs:element name="DlvryMtd" type="ChequeDeliveryMethod1Choice" minOccurs="0" maxOccurs="1"/>
+<xs:element name="DlvrTo" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
+<xs:element name="InstrPrty" type="Priority2Code" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ChqMtrtyDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
+<xs:element name="FrmsCd" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="MemoFld" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RgnlClrZone" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="PrtLctn" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="ChequeDelivery1Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="MLDB"/>
+<xs:enumeration value="MLCD"/>
+<xs:enumeration value="MLFA"/>
+<xs:enumeration value="CRDB"/>
+<xs:enumeration value="CRCD"/>
+<xs:enumeration value="CRFA"/>
+<xs:enumeration value="PUDB"/>
+<xs:enumeration value="PUCD"/>
+<xs:enumeration value="PUFA"/>
+<xs:enumeration value="RGDB"/>
+<xs:enumeration value="RGCD"/>
+<xs:enumeration value="RGFA"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="ChequeDeliveryMethod1Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="Cd" type="ChequeDelivery1Code"/>
+<xs:element name="Prtry" type="Max35Text"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="ChequeType2Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="CCHQ"/>
+<xs:enumeration value="CCCH"/>
+<xs:enumeration value="BCHQ"/>
+<xs:enumeration value="DRFT"/>
+<xs:enumeration value="ELDR"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="ClearingChannel2Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="RTGS"/>
+<xs:enumeration value="RTNS"/>
+<xs:enumeration value="MPNS"/>
+<xs:enumeration value="BOOK"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="ClearingSystemMemberIdentification3Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="Id" type="ExternalClearingSystemMemberCode"/>
+<xs:element name="Prtry" type="Max35Text"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="CountryCode">
+<xs:restriction base="xs:string">
+<xs:pattern value="[A-Z]{2,2}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="CreditTransferTransactionInformation1">
+<xs:sequence>
+<xs:element name="PmtId" type="PaymentIdentification1"/>
+<xs:element name="PmtTpInf" type="PaymentTypeInformation1" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Amt" type="AmountType2Choice"/>
+<xs:element name="XchgRateInf" type="ExchangeRateInformation1" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ChrgBr" type="ChargeBearerType1Code" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ChqInstr" type="Cheque5" minOccurs="0" maxOccurs="1"/>
+<xs:element name="UltmtDbtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
+<xs:element name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
+<xs:element name="IntrmyAgt1Acct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
+<xs:element name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
+<xs:element name="IntrmyAgt2Acct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
+<xs:element name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
+<xs:element name="IntrmyAgt3Acct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CdtrAgtAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Cdtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CdtrAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
+<xs:element name="UltmtCdtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
+<xs:element name="InstrForCdtrAgt" type="InstructionForCreditorAgent1" minOccurs="0" maxOccurs="unbounded"/>
+<xs:element name="InstrForDbtrAgt" type="Max140Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Purp" type="Purpose1Choice" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RgltryRptg" type="RegulatoryReporting2" minOccurs="0" maxOccurs="10"/>
+<xs:element name="Tax" type="TaxInformation2" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RltdRmtInf" type="RemittanceLocation1" minOccurs="0" maxOccurs="10"/>
+<xs:element name="RmtInf" type="RemittanceInformation1" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="CreditorReferenceInformation1">
+<xs:sequence>
+<xs:element name="CdtrRefTp" type="CreditorReferenceType1" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CdtrRef" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="CreditorReferenceType1">
+<xs:sequence>
+<xs:choice>
+<xs:element name="Cd" type="DocumentType3Code"/>
+<xs:element name="Prtry" type="Max35Text"/>
+</xs:choice>
+<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="CurrencyAndAmount_SimpleType">
+<xs:restriction base="xs:decimal">
+<xs:minInclusive value="0"/>
+<xs:fractionDigits value="5"/>
+<xs:totalDigits value="18"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="CurrencyAndAmount">
+<xs:simpleContent>
+<xs:extension base="CurrencyAndAmount_SimpleType">
+<xs:attribute name="Ccy" type="CurrencyCode" use="required"/>
+</xs:extension>
+</xs:simpleContent>
+</xs:complexType>
+<xs:simpleType name="CurrencyCode">
+<xs:restriction base="xs:string">
+<xs:pattern value="[A-Z]{3,3}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="DateAndPlaceOfBirth">
+<xs:sequence>
+<xs:element name="BirthDt" type="ISODate"/>
+<xs:element name="PrvcOfBirth" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CityOfBirth" type="Max35Text"/>
+<xs:element name="CtryOfBirth" type="CountryCode"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="DecimalNumber">
+<xs:restriction base="xs:decimal">
+<xs:fractionDigits value="17"/>
+<xs:totalDigits value="18"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="Document">
+<xs:sequence>
+<xs:element name="pain.001.001.02" type="pain.001.001.02"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="DocumentType2Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="MSIN"/>
+<xs:enumeration value="CNFA"/>
+<xs:enumeration value="DNFA"/>
+<xs:enumeration value="CINV"/>
+<xs:enumeration value="CREN"/>
+<xs:enumeration value="DEBN"/>
+<xs:enumeration value="HIRI"/>
+<xs:enumeration value="SBIN"/>
+<xs:enumeration value="CMCN"/>
+<xs:enumeration value="SOAC"/>
+<xs:enumeration value="DISP"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="DocumentType3Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="RADM"/>
+<xs:enumeration value="RPIN"/>
+<xs:enumeration value="FXDR"/>
+<xs:enumeration value="DISP"/>
+<xs:enumeration value="PUOR"/>
+<xs:enumeration value="SCOR"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="DunsIdentifier">
+<xs:restriction base="xs:string">
+<xs:pattern value="[0-9]{9,9}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="EANGLNIdentifier">
+<xs:restriction base="xs:string">
+<xs:pattern value="[0-9]{13,13}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="EquivalentAmount">
+<xs:sequence>
+<xs:element name="Amt" type="CurrencyAndAmount"/>
+<xs:element name="CcyOfTrf" type="CurrencyCode"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="ExchangeRateInformation1">
+<xs:sequence>
+<xs:element name="XchgRate" type="BaseOneRate" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RateTp" type="ExchangeRateType1Code" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CtrctId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="ExchangeRateType1Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="SPOT"/>
+<xs:enumeration value="SALE"/>
+<xs:enumeration value="AGRD"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="ExternalClearingSystemMemberCode">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="35"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="ExternalLocalInstrumentCode">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="35"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="ExternalPurposeCode">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="35"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="FinancialInstitutionIdentification3">
+<xs:sequence>
+<xs:element name="BIC" type="BICIdentifier" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification3Choice" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
+<xs:element name="PrtryId" type="GenericIdentification3" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="FinancialInstitutionIdentification5Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="BIC" type="BICIdentifier"/>
+<xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification3Choice"/>
+<xs:element name="NmAndAdr" type="NameAndAddress7"/>
+<xs:element name="PrtryId" type="GenericIdentification3"/>
+<xs:element name="CmbndId" type="FinancialInstitutionIdentification3"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="GenericIdentification3">
+<xs:sequence>
+<xs:element name="Id" type="Max35Text"/>
+<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="GenericIdentification4">
+<xs:sequence>
+<xs:element name="Id" type="Max35Text"/>
+<xs:element name="IdTp" type="Max35Text"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="GroupHeader1">
+<xs:sequence>
+<xs:element name="MsgId" type="Max35Text"/>
+<xs:element name="CreDtTm" type="ISODateTime"/>
+<xs:element name="Authstn" type="Max128Text" minOccurs="0" maxOccurs="2"/>
+<xs:element name="BtchBookg" type="BatchBookingIndicator" minOccurs="0" maxOccurs="1"/>
+<xs:element name="NbOfTxs" type="Max15NumericText"/>
+<xs:element name="CtrlSum" type="DecimalNumber" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Grpg" type="Grouping1Code"/>
+<xs:element name="InitgPty" type="PartyIdentification8"/>
+<xs:element name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="Grouping1Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="SNGL"/>
+<xs:enumeration value="GRPD"/>
+<xs:enumeration value="MIXD"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="IBANIdentifier">
+<xs:restriction base="xs:string">
+<xs:pattern value="[a-zA-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="IBEIIdentifier">
+<xs:restriction base="xs:string">
+<xs:pattern value="[A-Z]{2,2}[B-DF-HJ-NP-TV-XZ0-9]{7,7}[0-9]{1,1}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="ISODate">
+<xs:restriction base="xs:date"/>
+</xs:simpleType>
+<xs:simpleType name="ISODateTime">
+<xs:restriction base="xs:dateTime"/>
+</xs:simpleType>
+<xs:simpleType name="Instruction3Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="CHQB"/>
+<xs:enumeration value="HOLD"/>
+<xs:enumeration value="PHOB"/>
+<xs:enumeration value="TELB"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="InstructionForCreditorAgent1">
+<xs:sequence>
+<xs:element name="Cd" type="Instruction3Code" minOccurs="0" maxOccurs="1"/>
+<xs:element name="InstrInf" type="Max140Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="LocalInstrument1Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="Cd" type="ExternalLocalInstrumentCode"/>
+<xs:element name="Prtry" type="Max35Text"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="Max128Text">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="128"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="Max140Text">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="140"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="Max15NumericText">
+<xs:restriction base="xs:string">
+<xs:pattern value="[0-9]{1,15}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="Max16Text">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="16"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="Max256Text">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="256"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="Max34Text">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="34"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="Max35Text">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="35"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="Max3Text">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="3"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="Max70Text">
+<xs:restriction base="xs:string">
+<xs:minLength value="1"/>
+<xs:maxLength value="70"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="NameAndAddress3">
+<xs:sequence>
+<xs:element name="Nm" type="Max70Text"/>
+<xs:element name="Adr" type="PostalAddress1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="NameAndAddress7">
+<xs:sequence>
+<xs:element name="Nm" type="Max70Text"/>
+<xs:element name="PstlAdr" type="PostalAddress1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="OrganisationIdentification2">
+<xs:sequence>
+<xs:element name="BIC" type="BICIdentifier" minOccurs="0" maxOccurs="1"/>
+<xs:element name="IBEI" type="IBEIIdentifier" minOccurs="0" maxOccurs="1"/>
+<xs:element name="BEI" type="BEIIdentifier" minOccurs="0" maxOccurs="1"/>
+<xs:element name="EANGLN" type="EANGLNIdentifier" minOccurs="0" maxOccurs="1"/>
+<xs:element name="USCHU" type="CHIPSUniversalIdentifier" minOccurs="0" maxOccurs="1"/>
+<xs:element name="DUNS" type="DunsIdentifier" minOccurs="0" maxOccurs="1"/>
+<xs:element name="BkPtyId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="TaxIdNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="PrtryId" type="GenericIdentification3" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="Party2Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="OrgId" type="OrganisationIdentification2"/>
+<xs:element name="PrvtId" type="PersonIdentification3" minOccurs="1" maxOccurs="4"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="PartyIdentification8">
+<xs:sequence>
+<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Id" type="Party2Choice" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CtryOfRes" type="CountryCode" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="PaymentCategoryPurpose1Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="CORT"/>
+<xs:enumeration value="SALA"/>
+<xs:enumeration value="TREA"/>
+<xs:enumeration value="CASH"/>
+<xs:enumeration value="DIVI"/>
+<xs:enumeration value="GOVT"/>
+<xs:enumeration value="INTE"/>
+<xs:enumeration value="LOAN"/>
+<xs:enumeration value="PENS"/>
+<xs:enumeration value="SECU"/>
+<xs:enumeration value="SSBE"/>
+<xs:enumeration value="SUPP"/>
+<xs:enumeration value="TAXS"/>
+<xs:enumeration value="TRAD"/>
+<xs:enumeration value="VATX"/>
+<xs:enumeration value="HEDG"/>
+<xs:enumeration value="INTC"/>
+<xs:enumeration value="WHLD"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="PaymentIdentification1">
+<xs:sequence>
+<xs:element name="InstrId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="EndToEndId" type="Max35Text"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="PaymentInstructionInformation1">
+<xs:sequence>
+<xs:element name="PmtInfId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="PmtMtd" type="PaymentMethod3Code"/>
+<xs:element name="PmtTpInf" type="PaymentTypeInformation1" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ReqdExctnDt" type="ISODate"/>
+<xs:element name="PoolgAdjstmntDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Dbtr" type="PartyIdentification8"/>
+<xs:element name="DbtrAcct" type="CashAccount7"/>
+<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification3"/>
+<xs:element name="DbtrAgtAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
+<xs:element name="UltmtDbtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ChrgBr" type="ChargeBearerType1Code" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ChrgsAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CdtTrfTxInf" type="CreditTransferTransactionInformation1" minOccurs="1" maxOccurs="unbounded"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="PaymentMethod3Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="CHK"/>
+<xs:enumeration value="TRF"/>
+<xs:enumeration value="TRA"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="PaymentTypeInformation1">
+<xs:sequence>
+<xs:element name="InstrPrty" type="Priority2Code" minOccurs="0" maxOccurs="1"/>
+<xs:choice>
+<xs:element name="SvcLvl" type="ServiceLevel2Choice" minOccurs="0" maxOccurs="1"/>
+<xs:element name="ClrChanl" type="ClearingChannel2Code" minOccurs="0" maxOccurs="1"/>
+</xs:choice>
+<xs:element name="LclInstrm" type="LocalInstrument1Choice" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CtgyPurp" type="PaymentCategoryPurpose1Code" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="PercentageRate">
+<xs:restriction base="xs:decimal">
+<xs:fractionDigits value="10"/>
+<xs:totalDigits value="11"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="PersonIdentification3">
+<xs:sequence>
+<xs:choice>
+<xs:element name="DrvrsLicNb" type="Max35Text"/>
+<xs:element name="CstmrNb" type="Max35Text"/>
+<xs:element name="SclSctyNb" type="Max35Text"/>
+<xs:element name="AlnRegnNb" type="Max35Text"/>
+<xs:element name="PsptNb" type="Max35Text"/>
+<xs:element name="TaxIdNb" type="Max35Text"/>
+<xs:element name="IdntyCardNb" type="Max35Text"/>
+<xs:element name="MplyrIdNb" type="Max35Text"/>
+<xs:element name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
+<xs:element name="OthrId" type="GenericIdentification4"/>
+</xs:choice>
+<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="PostalAddress1">
+<xs:sequence>
+<xs:element name="AdrTp" type="AddressType2Code" minOccurs="0" maxOccurs="1"/>
+<xs:element name="AdrLine" type="Max70Text" minOccurs="0" maxOccurs="5"/>
+<xs:element name="StrtNm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="BldgNb" type="Max16Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="PstCd" type="Max16Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="TwnNm" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CtrySubDvsn" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Ctry" type="CountryCode"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="Priority2Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="HIGH"/>
+<xs:enumeration value="NORM"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="Purpose1Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="Cd" type="ExternalPurposeCode"/>
+<xs:element name="Prtry" type="Max35Text"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="ReferredDocumentAmount1Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="DuePyblAmt" type="CurrencyAndAmount"/>
+<xs:element name="DscntApldAmt" type="CurrencyAndAmount"/>
+<xs:element name="RmtdAmt" type="CurrencyAndAmount"/>
+<xs:element name="CdtNoteAmt" type="CurrencyAndAmount"/>
+<xs:element name="TaxAmt" type="CurrencyAndAmount"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="ReferredDocumentInformation1">
+<xs:sequence>
+<xs:element name="RfrdDocTp" type="ReferredDocumentType1" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RfrdDocNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="ReferredDocumentType1">
+<xs:sequence>
+<xs:choice>
+<xs:element name="Cd" type="DocumentType2Code"/>
+<xs:element name="Prtry" type="Max35Text"/>
+</xs:choice>
+<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="RegulatoryAuthority">
+<xs:sequence>
+<xs:element name="AuthrtyNm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="AuthrtyCtry" type="CountryCode" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="RegulatoryReporting2">
+<xs:sequence>
+<xs:element name="DbtCdtRptgInd" type="RegulatoryReportingType1Code" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Authrty" type="RegulatoryAuthority" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RgltryDtls" type="StructuredRegulatoryReporting2" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="RegulatoryReportingType1Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="CRED"/>
+<xs:enumeration value="DEBT"/>
+<xs:enumeration value="BOTH"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="RemittanceInformation1">
+<xs:sequence>
+<xs:element name="Ustrd" type="Max140Text" minOccurs="0" maxOccurs="unbounded"/>
+<xs:element name="Strd" type="StructuredRemittanceInformation6" minOccurs="0" maxOccurs="unbounded"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="RemittanceLocation1">
+<xs:sequence>
+<xs:element name="RmtId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RmtLctnMtd" type="RemittanceLocationMethod1Code" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RmtLctnElctrncAdr" type="Max256Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RmtLctnPstlAdr" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="RemittanceLocationMethod1Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="FAXI"/>
+<xs:enumeration value="EDIC"/>
+<xs:enumeration value="URID"/>
+<xs:enumeration value="EMAL"/>
+<xs:enumeration value="POST"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:simpleType name="ServiceLevel1Code">
+<xs:restriction base="xs:string">
+<xs:enumeration value="SEPA"/>
+<xs:enumeration value="SDVA"/>
+<xs:enumeration value="PRPT"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="ServiceLevel2Choice">
+<xs:sequence>
+<xs:choice>
+<xs:element name="Cd" type="ServiceLevel1Code"/>
+<xs:element name="Prtry" type="Max35Text"/>
+</xs:choice>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="SimpleIdentificationInformation2">
+<xs:sequence>
+<xs:element name="Id" type="Max34Text"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="StructuredRegulatoryReporting2">
+<xs:sequence>
+<xs:element name="Cd" type="Max3Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Amt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Inf" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="StructuredRemittanceInformation6">
+<xs:sequence>
+<xs:element name="RfrdDocInf" type="ReferredDocumentInformation1" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RfrdDocRltdDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
+<xs:element name="RfrdDocAmt" type="ReferredDocumentAmount1Choice" minOccurs="0" maxOccurs="unbounded"/>
+<xs:element name="CdtrRefInf" type="CreditorReferenceInformation1" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Invcr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Invcee" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
+<xs:element name="AddtlRmtInf" type="Max140Text" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="TaxDetails">
+<xs:sequence>
+<xs:element name="CertId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="TaxTp" type="TaxType" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="TaxInformation2">
+<xs:sequence>
+<xs:element name="CdtrTaxId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="CdtrTaxTp" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="DbtrTaxId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="TaxRefNb" type="Max140Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="TtlTaxblBaseAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
+<xs:element name="TtlTaxAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
+<xs:element name="TaxDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
+<xs:element name="TaxTpInf" type="TaxDetails" minOccurs="0" maxOccurs="unbounded"/>
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="TaxType">
+<xs:sequence>
+<xs:element name="CtgyDesc" type="Max35Text" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Rate" type="PercentageRate" minOccurs="0" maxOccurs="1"/>
+<xs:element name="TaxblBaseAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
+<xs:element name="Amt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
+</xs:sequence>
+</xs:complexType>
+<xs:simpleType name="UPICIdentifier">
+<xs:restriction base="xs:string">
+<xs:pattern value="[0-9]{8,17}"/>
+</xs:restriction>
+</xs:simpleType>
+<xs:complexType name="pain.001.001.02">
+<xs:sequence>
+<xs:element name="GrpHdr" type="GroupHeader1"/>
+<xs:element name="PmtInf" type="PaymentInstructionInformation1" minOccurs="1" maxOccurs="unbounded"/>
+</xs:sequence>
+</xs:complexType>
+</xs:schema>

=== added file 'account_payment_sepa_credit_transfer/data/pain.001.001.03.xsd'
--- account_payment_sepa_credit_transfer/data/pain.001.001.03.xsd	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/data/pain.001.001.03.xsd	2014-02-09 15:13:05 +0000
@@ -0,0 +1,921 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--Generated by SWIFTStandards Workstation (build:R6.1.0.2) on 2009 Jan 08 17:30:53-->
+<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03">
+    <xs:element name="Document" type="Document"/>
+    <xs:complexType name="AccountIdentification4Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="IBAN" type="IBAN2007Identifier"/>
+                <xs:element name="Othr" type="GenericAccountIdentification1"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="AccountSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+        <xs:restriction base="xs:decimal">
+            <xs:minInclusive value="0"/>
+            <xs:fractionDigits value="5"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
+        <xs:simpleContent>
+            <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+                <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{3,3}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="AddressType2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="ADDR"/>
+            <xs:enumeration value="PBOX"/>
+            <xs:enumeration value="HOME"/>
+            <xs:enumeration value="BIZZ"/>
+            <xs:enumeration value="MLTO"/>
+            <xs:enumeration value="DLVY"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="AmountType3Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+                <xs:element name="EqvtAmt" type="EquivalentAmount2"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="AnyBICIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Authorisation1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="Authorisation1Code"/>
+                <xs:element name="Prtry" type="Max128Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Authorisation1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUTH"/>
+            <xs:enumeration value="FDET"/>
+            <xs:enumeration value="FSUM"/>
+            <xs:enumeration value="ILEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BICIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BaseOneRate">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="10"/>
+            <xs:totalDigits value="11"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BatchBookingIndicator">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+    <xs:complexType name="BranchAndFinancialInstitutionIdentification4">
+        <xs:sequence>
+            <xs:element name="FinInstnId" type="FinancialInstitutionIdentification7"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="BranchData2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccount16">
+        <xs:sequence>
+            <xs:element name="Id" type="AccountIdentification4Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccountType2">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="CashAccountType4Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="CashAccountType4Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CASH"/>
+            <xs:enumeration value="CHAR"/>
+            <xs:enumeration value="COMM"/>
+            <xs:enumeration value="TAXE"/>
+            <xs:enumeration value="CISH"/>
+            <xs:enumeration value="TRAS"/>
+            <xs:enumeration value="SACC"/>
+            <xs:enumeration value="CACC"/>
+            <xs:enumeration value="SVGS"/>
+            <xs:enumeration value="ONDP"/>
+            <xs:enumeration value="MGLD"/>
+            <xs:enumeration value="NREX"/>
+            <xs:enumeration value="MOMA"/>
+            <xs:enumeration value="LOAN"/>
+            <xs:enumeration value="SLRY"/>
+            <xs:enumeration value="ODFT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="CategoryPurpose1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ChargeBearerType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="SHAR"/>
+            <xs:enumeration value="SLEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Cheque6">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
+            <xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ChequeDelivery1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MLDB"/>
+            <xs:enumeration value="MLCD"/>
+            <xs:enumeration value="MLFA"/>
+            <xs:enumeration value="CRDB"/>
+            <xs:enumeration value="CRCD"/>
+            <xs:enumeration value="CRFA"/>
+            <xs:enumeration value="PUDB"/>
+            <xs:enumeration value="PUCD"/>
+            <xs:enumeration value="PUFA"/>
+            <xs:enumeration value="RGDB"/>
+            <xs:enumeration value="RGCD"/>
+            <xs:enumeration value="RGFA"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ChequeDeliveryMethod1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ChequeDelivery1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ChequeType2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CCHQ"/>
+            <xs:enumeration value="CCCH"/>
+            <xs:enumeration value="BCHQ"/>
+            <xs:enumeration value="DRFT"/>
+            <xs:enumeration value="ELDR"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ClearingSystemIdentification2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ClearingSystemMemberIdentification2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
+            <xs:element name="MmbId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ContactDetails2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="CountryCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="CreditDebitCode">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRDT"/>
+            <xs:enumeration value="DBIT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="CreditTransferTransactionInformation10">
+        <xs:sequence>
+            <xs:element name="PmtId" type="PaymentIdentification1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
+            <xs:element name="Amt" type="AmountType3Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRateInformation1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation5"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceInformation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="DocumentType3Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CustomerCreditTransferInitiationV03">
+        <xs:sequence>
+            <xs:element name="GrpHdr" type="GroupHeader32"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstructionInformation3"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DateAndPlaceOfBirth">
+        <xs:sequence>
+            <xs:element name="BirthDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
+            <xs:element name="CityOfBirth" type="Max35Text"/>
+            <xs:element name="CtryOfBirth" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DatePeriodDetails">
+        <xs:sequence>
+            <xs:element name="FrDt" type="ISODate"/>
+            <xs:element name="ToDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DecimalNumber">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="17"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Document">
+        <xs:sequence>
+            <xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV03"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DocumentAdjustment1">
+        <xs:sequence>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DocumentType3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="RADM"/>
+            <xs:enumeration value="RPIN"/>
+            <xs:enumeration value="FXDR"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="PUOR"/>
+            <xs:enumeration value="SCOR"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="DocumentType5Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MSIN"/>
+            <xs:enumeration value="CNFA"/>
+            <xs:enumeration value="DNFA"/>
+            <xs:enumeration value="CINV"/>
+            <xs:enumeration value="CREN"/>
+            <xs:enumeration value="DEBN"/>
+            <xs:enumeration value="HIRI"/>
+            <xs:enumeration value="SBIN"/>
+            <xs:enumeration value="CMCN"/>
+            <xs:enumeration value="SOAC"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="BOLD"/>
+            <xs:enumeration value="VCHR"/>
+            <xs:enumeration value="AROI"/>
+            <xs:enumeration value="TSUT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="EquivalentAmount2">
+        <xs:sequence>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element name="CcyOfTrf" type="ActiveOrHistoricCurrencyCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ExchangeRateInformation1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RateTp" type="ExchangeRateType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrctId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ExchangeRateType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="SPOT"/>
+            <xs:enumeration value="SALE"/>
+            <xs:enumeration value="AGRD"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalAccountIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalCategoryPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalClearingSystemIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="5"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalLocalInstrument1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalOrganisationIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPersonIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalServiceLevel1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="FinancialIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="FinancialInstitutionIdentification7">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="BIC" type="BICIdentifier"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericAccountIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max34Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericFinancialIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericOrganisationIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericPersonIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GroupHeader32">
+        <xs:sequence>
+            <xs:element name="MsgId" type="Max35Text"/>
+            <xs:element name="CreDtTm" type="ISODateTime"/>
+            <xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
+            <xs:element name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element name="InitgPty" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="IBAN2007Identifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ISODate">
+        <xs:restriction base="xs:date"/>
+    </xs:simpleType>
+    <xs:simpleType name="ISODateTime">
+        <xs:restriction base="xs:dateTime"/>
+    </xs:simpleType>
+    <xs:simpleType name="Instruction3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CHQB"/>
+            <xs:enumeration value="HOLD"/>
+            <xs:enumeration value="PHOB"/>
+            <xs:enumeration value="TELB"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="InstructionForCreditorAgent1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="LocalInstrument2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Max10Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="10"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max128Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="128"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max140Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="140"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max15NumericText">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[0-9]{1,15}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max16Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="16"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max2048Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="2048"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max34Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="34"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max35Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max4Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max70Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="70"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="NameAndAddress10">
+        <xs:sequence>
+            <xs:element name="Nm" type="Max140Text"/>
+            <xs:element name="Adr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="NamePrefix1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DOCT"/>
+            <xs:enumeration value="MIST"/>
+            <xs:enumeration value="MISS"/>
+            <xs:enumeration value="MADM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Number">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="0"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="OrganisationIdentification4">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="BICOrBEI" type="AnyBICIdentifier"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="OrganisationIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="Party6Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="OrgId" type="OrganisationIdentification4"/>
+                <xs:element name="PrvtId" type="PersonIdentification5"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PartyIdentification32">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party6Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentIdentification1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
+            <xs:element name="EndToEndId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentInstructionInformation3">
+        <xs:sequence>
+            <xs:element name="PmtInfId" type="Max35Text"/>
+            <xs:element name="PmtMtd" type="PaymentMethod3Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
+            <xs:element name="ReqdExctnDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
+            <xs:element name="Dbtr" type="PartyIdentification32"/>
+            <xs:element name="DbtrAcct" type="CashAccount16"/>
+            <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransactionInformation10"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PaymentMethod3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CHK"/>
+            <xs:enumeration value="TRF"/>
+            <xs:enumeration value="TRA"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PaymentTypeInformation19">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PercentageRate">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="10"/>
+            <xs:totalDigits value="11"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PersonIdentification5">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PersonIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PhoneNumber">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PostalAddress6">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Priority2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="HIGH"/>
+            <xs:enumeration value="NORM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Purpose2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalPurpose1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="DocumentType5Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryAuthority2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RegulatoryReportingType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="BOTH"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="RemittanceAmount1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DscntApldAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceInformation5">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation7"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceLocation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RemittanceLocationMethod2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="FAXI"/>
+            <xs:enumeration value="EDIC"/>
+            <xs:enumeration value="URID"/>
+            <xs:enumeration value="EMAL"/>
+            <xs:enumeration value="POST"/>
+            <xs:enumeration value="SMSM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ServiceLevel8Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalServiceLevel1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="StructuredRegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="StructuredRemittanceInformation7">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification32"/>
+            <xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmount1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAuthorisation1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxPeriod1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecord1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecordDetails1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="TaxRecordPeriod1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MM01"/>
+            <xs:enumeration value="MM02"/>
+            <xs:enumeration value="MM03"/>
+            <xs:enumeration value="MM04"/>
+            <xs:enumeration value="MM05"/>
+            <xs:enumeration value="MM06"/>
+            <xs:enumeration value="MM07"/>
+            <xs:enumeration value="MM08"/>
+            <xs:enumeration value="MM09"/>
+            <xs:enumeration value="MM10"/>
+            <xs:enumeration value="MM11"/>
+            <xs:enumeration value="MM12"/>
+            <xs:enumeration value="QTR1"/>
+            <xs:enumeration value="QTR2"/>
+            <xs:enumeration value="QTR3"/>
+            <xs:enumeration value="QTR4"/>
+            <xs:enumeration value="HLF1"/>
+            <xs:enumeration value="HLF2"/>
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>

=== added file 'account_payment_sepa_credit_transfer/data/pain.001.001.04.xsd'
--- account_payment_sepa_credit_transfer/data/pain.001.001.04.xsd	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/data/pain.001.001.04.xsd	2014-02-09 15:13:05 +0000
@@ -0,0 +1,968 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Generated by SWIFTStandards Workstation (build:R7.1.30.4) on 2012 Jun 07 20:47:19-->
+<xs:schema elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.04" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.04" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+    <xs:element name="Document" type="Document"/>
+    <xs:complexType name="AccountIdentification4Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="IBAN" type="IBAN2007Identifier"/>
+                <xs:element name="Othr" type="GenericAccountIdentification1"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="AccountSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="5"/>
+            <xs:totalDigits value="18"/>
+            <xs:minInclusive value="0"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
+        <xs:simpleContent>
+            <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+                <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{3,3}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="AddressType2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="ADDR"/>
+            <xs:enumeration value="PBOX"/>
+            <xs:enumeration value="HOME"/>
+            <xs:enumeration value="BIZZ"/>
+            <xs:enumeration value="MLTO"/>
+            <xs:enumeration value="DLVY"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="AmountType3Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+                <xs:element name="EqvtAmt" type="EquivalentAmount2"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="AnyBICIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Authorisation1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="Authorisation1Code"/>
+                <xs:element name="Prtry" type="Max128Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Authorisation1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUTH"/>
+            <xs:enumeration value="FDET"/>
+            <xs:enumeration value="FSUM"/>
+            <xs:enumeration value="ILEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BICFIIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BaseOneRate">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="10"/>
+            <xs:totalDigits value="11"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BatchBookingIndicator">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+    <xs:complexType name="BranchAndFinancialInstitutionIdentification5">
+        <xs:sequence>
+            <xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="BranchData2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccount24">
+        <xs:sequence>
+            <xs:element name="Id" type="AccountIdentification4Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccountType2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalCashAccountType1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CategoryPurpose1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ChargeBearerType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="SHAR"/>
+            <xs:enumeration value="SLEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Cheque7">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
+            <xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
+            <xs:element maxOccurs="5" minOccurs="0" name="Sgntr" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ChequeDelivery1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MLDB"/>
+            <xs:enumeration value="MLCD"/>
+            <xs:enumeration value="MLFA"/>
+            <xs:enumeration value="CRDB"/>
+            <xs:enumeration value="CRCD"/>
+            <xs:enumeration value="CRFA"/>
+            <xs:enumeration value="PUDB"/>
+            <xs:enumeration value="PUCD"/>
+            <xs:enumeration value="PUFA"/>
+            <xs:enumeration value="RGDB"/>
+            <xs:enumeration value="RGCD"/>
+            <xs:enumeration value="RGFA"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ChequeDeliveryMethod1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ChequeDelivery1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ChequeType2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CCHQ"/>
+            <xs:enumeration value="CCCH"/>
+            <xs:enumeration value="BCHQ"/>
+            <xs:enumeration value="DRFT"/>
+            <xs:enumeration value="ELDR"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ClearingSystemIdentification2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ClearingSystemMemberIdentification2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
+            <xs:element name="MmbId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ContactDetails2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="CountryCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="CreditDebitCode">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRDT"/>
+            <xs:enumeration value="DBIT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="CreditTransferTransaction1">
+        <xs:sequence>
+            <xs:element name="PmtId" type="PaymentIdentification1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
+            <xs:element name="Amt" type="AmountType3Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRate1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque7"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation7"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceInformation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="DocumentType3Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CustomerCreditTransferInitiationV04">
+        <xs:sequence>
+            <xs:element name="GrpHdr" type="GroupHeader48"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstruction6"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DateAndPlaceOfBirth">
+        <xs:sequence>
+            <xs:element name="BirthDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
+            <xs:element name="CityOfBirth" type="Max35Text"/>
+            <xs:element name="CtryOfBirth" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DatePeriodDetails">
+        <xs:sequence>
+            <xs:element name="FrDt" type="ISODate"/>
+            <xs:element name="ToDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DecimalNumber">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="17"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="DiscountAmountAndType1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DiscountAmountType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalDiscountAmountType1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="Document">
+        <xs:sequence>
+            <xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV04"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DocumentAdjustment1">
+        <xs:sequence>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DocumentType3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="RADM"/>
+            <xs:enumeration value="RPIN"/>
+            <xs:enumeration value="FXDR"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="PUOR"/>
+            <xs:enumeration value="SCOR"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="DocumentType5Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MSIN"/>
+            <xs:enumeration value="CNFA"/>
+            <xs:enumeration value="DNFA"/>
+            <xs:enumeration value="CINV"/>
+            <xs:enumeration value="CREN"/>
+            <xs:enumeration value="DEBN"/>
+            <xs:enumeration value="HIRI"/>
+            <xs:enumeration value="SBIN"/>
+            <xs:enumeration value="CMCN"/>
+            <xs:enumeration value="SOAC"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="BOLD"/>
+            <xs:enumeration value="VCHR"/>
+            <xs:enumeration value="AROI"/>
+            <xs:enumeration value="TSUT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="EquivalentAmount2">
+        <xs:sequence>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element name="CcyOfTrf" type="ActiveOrHistoricCurrencyCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ExchangeRate1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="UnitCcy" type="ActiveOrHistoricCurrencyCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RateTp" type="ExchangeRateType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrctId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ExchangeRateType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="SPOT"/>
+            <xs:enumeration value="SALE"/>
+            <xs:enumeration value="AGRD"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalAccountIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalCashAccountType1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalCategoryPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalClearingSystemIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="5"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalDiscountAmountType1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalLocalInstrument1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalOrganisationIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPersonIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalServiceLevel1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalTaxAmountType1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="FinancialIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="FinancialInstitutionIdentification8">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericAccountIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max34Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericFinancialIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericOrganisationIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericPersonIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GroupHeader48">
+        <xs:sequence>
+            <xs:element name="MsgId" type="Max35Text"/>
+            <xs:element name="CreDtTm" type="ISODateTime"/>
+            <xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
+            <xs:element name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element name="InitgPty" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="IBAN2007Identifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ISODate">
+        <xs:restriction base="xs:date"/>
+    </xs:simpleType>
+    <xs:simpleType name="ISODateTime">
+        <xs:restriction base="xs:dateTime"/>
+    </xs:simpleType>
+    <xs:simpleType name="Instruction3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CHQB"/>
+            <xs:enumeration value="HOLD"/>
+            <xs:enumeration value="PHOB"/>
+            <xs:enumeration value="TELB"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="InstructionForCreditorAgent1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="LocalInstrument2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Max10Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="10"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max128Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="128"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max140Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="140"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max15NumericText">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[0-9]{1,15}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max16Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="16"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max2048Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="2048"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max34Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="34"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max350Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="350"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max35Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max4Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max70Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="70"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="NameAndAddress10">
+        <xs:sequence>
+            <xs:element name="Nm" type="Max140Text"/>
+            <xs:element name="Adr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="NamePrefix1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DOCT"/>
+            <xs:enumeration value="MIST"/>
+            <xs:enumeration value="MISS"/>
+            <xs:enumeration value="MADM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Number">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="0"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="OrganisationIdentification8">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="OrganisationIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="Party11Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="OrgId" type="OrganisationIdentification8"/>
+                <xs:element name="PrvtId" type="PersonIdentification5"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PartyIdentification43">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentIdentification1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
+            <xs:element name="EndToEndId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentInstruction6">
+        <xs:sequence>
+            <xs:element name="PmtInfId" type="Max35Text"/>
+            <xs:element name="PmtMtd" type="PaymentMethod3Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
+            <xs:element name="ReqdExctnDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
+            <xs:element name="Dbtr" type="PartyIdentification43"/>
+            <xs:element name="DbtrAcct" type="CashAccount24"/>
+            <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransaction1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PaymentMethod3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CHK"/>
+            <xs:enumeration value="TRF"/>
+            <xs:enumeration value="TRA"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PaymentTypeInformation19">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PercentageRate">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="10"/>
+            <xs:totalDigits value="11"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PersonIdentification5">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PersonIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PhoneNumber">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PostalAddress6">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Priority2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="HIGH"/>
+            <xs:enumeration value="NORM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Purpose2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalPurpose1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="DocumentType5Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryAuthority2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RegulatoryReportingType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="BOTH"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="RemittanceAmount2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceInformation7">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation9"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceLocation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RemittanceLocationMethod2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="FAXI"/>
+            <xs:enumeration value="EDIC"/>
+            <xs:enumeration value="URID"/>
+            <xs:enumeration value="EMAL"/>
+            <xs:enumeration value="POST"/>
+            <xs:enumeration value="SMSM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ServiceLevel8Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalServiceLevel1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="StructuredRegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="StructuredRemittanceInformation9">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/>
+            <xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="SupplementaryData1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/>
+            <xs:element name="Envlp" type="SupplementaryDataEnvelope1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="SupplementaryDataEnvelope1">
+        <xs:sequence>
+            <xs:any namespace="##any" processContents="lax"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmount1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmountAndType1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmountType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalTaxAmountType1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAuthorisation1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxPeriod1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecord1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecordDetails1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="TaxRecordPeriod1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MM01"/>
+            <xs:enumeration value="MM02"/>
+            <xs:enumeration value="MM03"/>
+            <xs:enumeration value="MM04"/>
+            <xs:enumeration value="MM05"/>
+            <xs:enumeration value="MM06"/>
+            <xs:enumeration value="MM07"/>
+            <xs:enumeration value="MM08"/>
+            <xs:enumeration value="MM09"/>
+            <xs:enumeration value="MM10"/>
+            <xs:enumeration value="MM11"/>
+            <xs:enumeration value="MM12"/>
+            <xs:enumeration value="QTR1"/>
+            <xs:enumeration value="QTR2"/>
+            <xs:enumeration value="QTR3"/>
+            <xs:enumeration value="QTR4"/>
+            <xs:enumeration value="HLF1"/>
+            <xs:enumeration value="HLF2"/>
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>
\ No newline at end of file

=== added file 'account_payment_sepa_credit_transfer/data/pain.001.001.05.xsd'
--- account_payment_sepa_credit_transfer/data/pain.001.001.05.xsd	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/data/pain.001.001.05.xsd	2014-02-09 15:13:05 +0000
@@ -0,0 +1,931 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Generated by Standards Editor (build:R1.0.41.3) on 2013 Mar 05 13:39:40, ISO 20022 version : 2013-->
+<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.05" xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.05">
+    <xs:element name="Document" type="Document"/>
+    <xs:complexType name="AccountIdentification4Choice">
+        <xs:choice>
+            <xs:element name="IBAN" type="IBAN2007Identifier"/>
+            <xs:element name="Othr" type="GenericAccountIdentification1"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="AccountSchemeName1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="5"/>
+            <xs:totalDigits value="18"/>
+            <xs:minInclusive value="0"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
+        <xs:simpleContent>
+            <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+                <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{3,3}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="AddressType2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="ADDR"/>
+            <xs:enumeration value="PBOX"/>
+            <xs:enumeration value="HOME"/>
+            <xs:enumeration value="BIZZ"/>
+            <xs:enumeration value="MLTO"/>
+            <xs:enumeration value="DLVY"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="AmountType3Choice">
+        <xs:choice>
+            <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element name="EqvtAmt" type="EquivalentAmount2"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:simpleType name="AnyBICIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Authorisation1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="Authorisation1Code"/>
+            <xs:element name="Prtry" type="Max128Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:simpleType name="Authorisation1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUTH"/>
+            <xs:enumeration value="FDET"/>
+            <xs:enumeration value="FSUM"/>
+            <xs:enumeration value="ILEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BICFIIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BaseOneRate">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="10"/>
+            <xs:totalDigits value="11"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BatchBookingIndicator">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+    <xs:complexType name="BranchAndFinancialInstitutionIdentification5">
+        <xs:sequence>
+            <xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="BranchData2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccount24">
+        <xs:sequence>
+            <xs:element name="Id" type="AccountIdentification4Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccountType2Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalCashAccountType1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="CategoryPurpose1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:simpleType name="ChargeBearerType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="SHAR"/>
+            <xs:enumeration value="SLEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Cheque7">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
+            <xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
+            <xs:element maxOccurs="5" minOccurs="0" name="Sgntr" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ChequeDelivery1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MLDB"/>
+            <xs:enumeration value="MLCD"/>
+            <xs:enumeration value="MLFA"/>
+            <xs:enumeration value="CRDB"/>
+            <xs:enumeration value="CRCD"/>
+            <xs:enumeration value="CRFA"/>
+            <xs:enumeration value="PUDB"/>
+            <xs:enumeration value="PUCD"/>
+            <xs:enumeration value="PUFA"/>
+            <xs:enumeration value="RGDB"/>
+            <xs:enumeration value="RGCD"/>
+            <xs:enumeration value="RGFA"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ChequeDeliveryMethod1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ChequeDelivery1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:simpleType name="ChequeType2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CCHQ"/>
+            <xs:enumeration value="CCCH"/>
+            <xs:enumeration value="BCHQ"/>
+            <xs:enumeration value="DRFT"/>
+            <xs:enumeration value="ELDR"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ClearingSystemIdentification2Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="ClearingSystemMemberIdentification2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
+            <xs:element name="MmbId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ContactDetails2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="CountryCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="CreditDebitCode">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRDT"/>
+            <xs:enumeration value="DBIT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="CreditTransferTransaction6">
+        <xs:sequence>
+            <xs:element name="PmtId" type="PaymentIdentification1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
+            <xs:element name="Amt" type="AmountType3Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRate1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque7"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation7"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceInformation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="DocumentType3Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CustomerCreditTransferInitiationV05">
+        <xs:sequence>
+            <xs:element name="GrpHdr" type="GroupHeader48"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstruction9"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DateAndPlaceOfBirth">
+        <xs:sequence>
+            <xs:element name="BirthDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
+            <xs:element name="CityOfBirth" type="Max35Text"/>
+            <xs:element name="CtryOfBirth" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DatePeriodDetails">
+        <xs:sequence>
+            <xs:element name="FrDt" type="ISODate"/>
+            <xs:element name="ToDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DecimalNumber">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="17"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="DiscountAmountAndType1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DiscountAmountType1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalDiscountAmountType1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="Document">
+        <xs:sequence>
+            <xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV05"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DocumentAdjustment1">
+        <xs:sequence>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DocumentType3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="RADM"/>
+            <xs:enumeration value="RPIN"/>
+            <xs:enumeration value="FXDR"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="PUOR"/>
+            <xs:enumeration value="SCOR"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="DocumentType5Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MSIN"/>
+            <xs:enumeration value="CNFA"/>
+            <xs:enumeration value="DNFA"/>
+            <xs:enumeration value="CINV"/>
+            <xs:enumeration value="CREN"/>
+            <xs:enumeration value="DEBN"/>
+            <xs:enumeration value="HIRI"/>
+            <xs:enumeration value="SBIN"/>
+            <xs:enumeration value="CMCN"/>
+            <xs:enumeration value="SOAC"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="BOLD"/>
+            <xs:enumeration value="VCHR"/>
+            <xs:enumeration value="AROI"/>
+            <xs:enumeration value="TSUT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="EquivalentAmount2">
+        <xs:sequence>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element name="CcyOfTrf" type="ActiveOrHistoricCurrencyCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ExchangeRate1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="UnitCcy" type="ActiveOrHistoricCurrencyCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RateTp" type="ExchangeRateType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrctId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ExchangeRateType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="SPOT"/>
+            <xs:enumeration value="SALE"/>
+            <xs:enumeration value="AGRD"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalAccountIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalCashAccountType1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalCategoryPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalClearingSystemIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="5"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalDiscountAmountType1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalLocalInstrument1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalOrganisationIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPersonIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalServiceLevel1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalTaxAmountType1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="FinancialIdentificationSchemeName1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="FinancialInstitutionIdentification8">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericAccountIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max34Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericFinancialIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericOrganisationIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericPersonIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GroupHeader48">
+        <xs:sequence>
+            <xs:element name="MsgId" type="Max35Text"/>
+            <xs:element name="CreDtTm" type="ISODateTime"/>
+            <xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
+            <xs:element name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element name="InitgPty" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="IBAN2007Identifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ISODate">
+        <xs:restriction base="xs:date"/>
+    </xs:simpleType>
+    <xs:simpleType name="ISODateTime">
+        <xs:restriction base="xs:dateTime"/>
+    </xs:simpleType>
+    <xs:simpleType name="Instruction3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CHQB"/>
+            <xs:enumeration value="HOLD"/>
+            <xs:enumeration value="PHOB"/>
+            <xs:enumeration value="TELB"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="InstructionForCreditorAgent1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="LocalInstrument2Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:simpleType name="Max10Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="10"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max128Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="128"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max140Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="140"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max15NumericText">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[0-9]{1,15}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max16Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="16"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max2048Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="2048"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max34Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="34"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max350Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="350"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max35Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max4Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max70Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="70"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="NameAndAddress10">
+        <xs:sequence>
+            <xs:element name="Nm" type="Max140Text"/>
+            <xs:element name="Adr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="NamePrefix1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DOCT"/>
+            <xs:enumeration value="MIST"/>
+            <xs:enumeration value="MISS"/>
+            <xs:enumeration value="MADM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Number">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="0"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="OrganisationIdentification8">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="OrganisationIdentificationSchemeName1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="Party11Choice">
+        <xs:choice>
+            <xs:element name="OrgId" type="OrganisationIdentification8"/>
+            <xs:element name="PrvtId" type="PersonIdentification5"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="PartyIdentification43">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentIdentification1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
+            <xs:element name="EndToEndId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentInstruction9">
+        <xs:sequence>
+            <xs:element name="PmtInfId" type="Max35Text"/>
+            <xs:element name="PmtMtd" type="PaymentMethod3Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
+            <xs:element name="ReqdExctnDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
+            <xs:element name="Dbtr" type="PartyIdentification43"/>
+            <xs:element name="DbtrAcct" type="CashAccount24"/>
+            <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransaction6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PaymentMethod3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CHK"/>
+            <xs:enumeration value="TRF"/>
+            <xs:enumeration value="TRA"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PaymentTypeInformation19">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PercentageRate">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="10"/>
+            <xs:totalDigits value="11"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PersonIdentification5">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PersonIdentificationSchemeName1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:simpleType name="PhoneNumber">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PostalAddress6">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Priority2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="HIGH"/>
+            <xs:enumeration value="NORM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Purpose2Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalPurpose1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="DocumentType5Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryAuthority2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RegulatoryReportingType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="BOTH"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="RemittanceAmount2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceInformation7">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation9"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceLocation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RemittanceLocationMethod2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="FAXI"/>
+            <xs:enumeration value="EDIC"/>
+            <xs:enumeration value="URID"/>
+            <xs:enumeration value="EMAL"/>
+            <xs:enumeration value="POST"/>
+            <xs:enumeration value="SMSM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ServiceLevel8Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalServiceLevel1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="StructuredRegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="StructuredRemittanceInformation9">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/>
+            <xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="SupplementaryData1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/>
+            <xs:element name="Envlp" type="SupplementaryDataEnvelope1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="SupplementaryDataEnvelope1">
+        <xs:sequence>
+            <xs:any namespace="##any" processContents="lax"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmount1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmountAndType1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmountType1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalTaxAmountType1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="TaxAuthorisation1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxPeriod1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecord1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecordDetails1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="TaxRecordPeriod1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MM01"/>
+            <xs:enumeration value="MM02"/>
+            <xs:enumeration value="MM03"/>
+            <xs:enumeration value="MM04"/>
+            <xs:enumeration value="MM05"/>
+            <xs:enumeration value="MM06"/>
+            <xs:enumeration value="MM07"/>
+            <xs:enumeration value="MM08"/>
+            <xs:enumeration value="MM09"/>
+            <xs:enumeration value="MM10"/>
+            <xs:enumeration value="MM11"/>
+            <xs:enumeration value="MM12"/>
+            <xs:enumeration value="QTR1"/>
+            <xs:enumeration value="QTR2"/>
+            <xs:enumeration value="QTR3"/>
+            <xs:enumeration value="QTR4"/>
+            <xs:enumeration value="HLF1"/>
+            <xs:enumeration value="HLF2"/>
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>

=== added file 'account_payment_sepa_credit_transfer/data/payment_type_sepa_sct.xml'
--- account_payment_sepa_credit_transfer/data/payment_type_sepa_sct.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/data/payment_type_sepa_sct.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data noupdate="0">
+
+
+<!-- TODO In the suitable_bank_types field, we should restrict to IBAN type and Rib+IBAN of l10n_fr_rib ? -->
+<record id="export_sepa_sct_001_001_05" model="payment.type">
+    <field name="name">SEPA Credit Transfer v05</field>
+    <field name="code">pain.001.001.05</field>
+    <field name="suitable_bank_types"
+       eval="[(6,0,[ref('base_iban.bank_iban')])]" />
+    <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>
+</record>
+
+<record id="export_sepa_sct_001_001_04" model="payment.type">
+    <field name="name">SEPA Credit Transfer v04</field>
+    <field name="code">pain.001.001.04</field>
+    <field name="suitable_bank_types"
+       eval="[(6,0,[ref('base_iban.bank_iban')])]" />
+    <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>
+</record>
+
+<record id="export_sepa_sct_001_001_03" model="payment.type">
+    <field name="name">SEPA Credit Transfer v03 (recommended)</field>
+    <field name="code">pain.001.001.03</field>
+    <field name="suitable_bank_types"
+       eval="[(6,0,[ref('base_iban.bank_iban')])]" />
+    <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>
+</record>
+
+<record id="export_sepa_sct_001_001_02" model="payment.type">
+    <field name="name">SEPA Credit Transfer v02</field>
+    <field name="code">pain.001.001.02</field>
+    <field name="suitable_bank_types"
+       eval="[(6,0,[ref('base_iban.bank_iban')])]" />
+    <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>
+</record>
+
+
+</data>
+</openerp>

=== added directory 'account_payment_sepa_credit_transfer/i18n'
=== added file 'account_payment_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot'
--- account_payment_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot	2014-02-09 15:13:05 +0000
@@ -0,0 +1,207 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_banking_sepa_credit_transfer
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-23 22:49+0000\n"
+"PO-Revision-Date: 2013-12-23 22:49+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa.wizard,state:0
+msgid "Create"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,nb_transactions:0
+#: field:banking.export.sepa.wizard,nb_transactions:0
+msgid "Number of Transactions"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,filename:0
+#: field:banking.export.sepa.wizard,filename:0
+msgid "Filename"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,state:0
+#: field:banking.export.sepa.wizard,state:0
+msgid "State"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa.wizard,charge_bearer:0
+msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Shared"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,batch_booking:0
+#: field:banking.export.sepa.wizard,batch_booking:0
+msgid "Batch Booking"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Sent"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard
+msgid "Export SEPA Credit Transfer File"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa:0
+msgid "SEPA Credit Transfer"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa.wizard,state:0
+msgid "Finish"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Reconciled"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Following Service Level"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Borne by Creditor"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Validate"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Generate"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Borne by Debtor"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:128
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:245
+#, python-format
+msgid "Error:"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,total_amount:0
+#: field:banking.export.sepa.wizard,total_amount:0
+msgid "Total Amount"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,charge_bearer:0
+#: field:banking.export.sepa.wizard,charge_bearer:0
+msgid "Charge Bearer"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "SEPA File Generation"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa
+msgid "SEPA export"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:246
+#, python-format
+msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')."
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,file:0
+#: field:banking.export.sepa.wizard,file_id:0
+msgid "SEPA XML File"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa,charge_bearer:0
+msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:129
+#, python-format
+msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'."
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa:0
+#: field:banking.export.sepa,payment_order_ids:0
+#: field:banking.export.sepa.wizard,payment_order_ids:0
+msgid "Payment Orders"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa:0
+msgid "General Information"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order
+#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa
+#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa
+msgid "SEPA Credit Transfer Files"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa,batch_booking:0
+#: help:banking.export.sepa.wizard,batch_booking:0
+msgid "If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file."
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa.wizard,file:0
+msgid "File"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Cancel"
+msgstr ""
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,create_date:0
+msgid "Generation Date"
+msgstr ""
+

=== added file 'account_payment_sepa_credit_transfer/i18n/es.po'
--- account_payment_sepa_credit_transfer/i18n/es.po	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/i18n/es.po	2014-02-09 15:13:05 +0000
@@ -0,0 +1,227 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment_sepa_credit_transfer
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0-20131224-002412\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-01-25 11:29+0000\n"
+"PO-Revision-Date: 2014-01-25 11:29+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_payment_sepa_credit_transfer
+#: selection:banking.export.sepa.wizard,state:0
+msgid "Create"
+msgstr "Crear"
+
+#. module: account_payment_sepa_credit_transfer
+#: field:banking.export.sepa,nb_transactions:0
+#: field:banking.export.sepa.wizard,nb_transactions:0
+msgid "Number of Transactions"
+msgstr "Número de transacciones"
+
+#. module: account_payment_sepa_credit_transfer
+#: field:banking.export.sepa,filename:0
+#: field:banking.export.sepa.wizard,filename:0
+msgid "Filename"
+msgstr "Nombre de archivo"
+
+#. module: account_payment_sepa_credit_transfer
+#: field:banking.export.sepa,state:0
+#: field:banking.export.sepa.wizard,state:0
+msgid "State"
+msgstr "Estado"
+
+#. module: account_payment_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Draft"
+msgstr "Borrador"
+
+#. module: account_payment_sepa_credit_transfer
+#: help:banking.export.sepa.wizard,charge_bearer:0
+msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
+msgstr "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
+
+#. module: account_payment_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Shared"
+msgstr "Compartido"
+
+#. module: account_payment_sepa_credit_transfer
+#: field:banking.export.sepa,batch_booking:0
+#: field:banking.export.sepa.wizard,batch_booking:0
+msgid "Batch Booking"
+msgstr "Procesamiento en lotes"
+
+#. module: account_payment_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Sent"
+msgstr "Enviado"
+
+#. module: account_payment_sepa_credit_transfer
+#: model:ir.model,name:account_payment_sepa_credit_transfer.model_banking_export_sepa_wizard
+msgid "Export SEPA Credit Transfer File"
+msgstr "Exportar a archivo Transferencia de créditos SEPA"
+
+#. module: account_payment_sepa_credit_transfer
+#: view:banking.export.sepa:0
+msgid "SEPA Credit Transfer"
+msgstr "Transferencia de créditos SEPA"
+
+#. module: account_payment_sepa_credit_transfer
+#: selection:banking.export.sepa.wizard,state:0
+msgid "Finish"
+msgstr "Finalizar"
+
+#. module: account_payment_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Reconciled"
+msgstr "Conciliado"
+
+#. module: account_payment_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Following Service Level"
+msgstr "Acuerdo de nivel de servicio"
+
+#. module: account_payment_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Borne by Creditor"
+msgstr "Sufragados por el acreedor"
+
+#. module: account_payment_sepa_credit_transfer
+#: model:payment.type,name:account_payment_sepa_credit_transfer.export_sepa_sct_001_001_05
+msgid "SEPA Credit Transfer v05"
+msgstr "Transferencia de créditos SEPA v05"
+
+#. module: account_payment_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Validate"
+msgstr "Validar"
+
+#. module: account_payment_sepa_credit_transfer
+#: model:payment.type,name:account_payment_sepa_credit_transfer.export_sepa_sct_001_001_03
+msgid "SEPA Credit Transfer v03 (recommended)"
+msgstr "Transferencia de créditos SEPA v03 (recommended)"
+
+#. module: account_payment_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Generate"
+msgstr "Generar"
+
+#. module: account_payment_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Borne by Debtor"
+msgstr "Sufragados por el deudor"
+
+#. module: account_payment_sepa_credit_transfer
+#: code:addons/account_payment_sepa_credit_transfer/wizard/export_sepa.py:128
+#: code:addons/account_payment_sepa_credit_transfer/wizard/export_sepa.py:246
+#, python-format
+msgid "Error:"
+msgstr "Error:"
+
+#. module: account_payment_sepa_credit_transfer
+#: field:banking.export.sepa,total_amount:0
+#: field:banking.export.sepa.wizard,total_amount:0
+msgid "Total Amount"
+msgstr "Total"
+
+#. module: account_payment_sepa_credit_transfer
+#: field:banking.export.sepa,charge_bearer:0
+#: field:banking.export.sepa.wizard,charge_bearer:0
+msgid "Charge Bearer"
+msgstr "Cargado al portador"
+
+#. module: account_payment_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "SEPA File Generation"
+msgstr "Creación de Archivo SEPA"
+
+#. module: account_payment_sepa_credit_transfer
+#: model:payment.type,name:account_payment_sepa_credit_transfer.export_sepa_sct_001_001_02
+msgid "SEPA Credit Transfer v02"
+msgstr "Transferencia de créditos SEPA v02"
+
+#. module: account_payment_sepa_credit_transfer
+#: model:ir.model,name:account_payment_sepa_credit_transfer.model_banking_export_sepa
+msgid "SEPA export"
+msgstr "Exportar SEPA"
+
+#. module: account_payment_sepa_credit_transfer
+#: code:addons/account_payment_sepa_credit_transfer/wizard/export_sepa.py:247
+#, python-format
+msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')."
+msgstr "Cuenta bancaria no disponible en la factura '%s' (linea de pago '%s')."
+
+#. module: account_payment_sepa_credit_transfer
+#: model:payment.type,name:account_payment_sepa_credit_transfer.export_sepa_sct_001_001_04
+msgid "SEPA Credit Transfer v04"
+msgstr "Transferencia de créditos SEPA v04"
+
+#. module: account_payment_sepa_credit_transfer
+#: field:banking.export.sepa,file:0
+#: field:banking.export.sepa.wizard,file_id:0
+msgid "SEPA XML File"
+msgstr "Archivo XML SEPA"
+
+#. module: account_payment_sepa_credit_transfer
+#: help:banking.export.sepa,charge_bearer:0
+msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
+msgstr "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
+
+#. module: account_payment_sepa_credit_transfer
+#: code:addons/account_payment_sepa_credit_transfer/wizard/export_sepa.py:129
+#, python-format
+msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'."
+msgstr "El código del tipo de pago '%s' no esta soportado. Los códigos para las Transferencia de créditos soportados son 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'."
+
+#. module: account_payment_sepa_credit_transfer
+#: view:banking.export.sepa:0
+#: field:banking.export.sepa,payment_order_ids:0
+#: field:banking.export.sepa.wizard,payment_order_ids:0
+msgid "Payment Orders"
+msgstr "Ordenes de pago"
+
+#. module: account_payment_sepa_credit_transfer
+#: view:banking.export.sepa:0
+msgid "General Information"
+msgstr "Información general"
+
+#. module: account_payment_sepa_credit_transfer
+#: model:ir.actions.act_window,name:account_payment_sepa_credit_transfer.act_banking_export_sepa_payment_order
+#: model:ir.actions.act_window,name:account_payment_sepa_credit_transfer.action_account_banking_sepa
+#: model:ir.ui.menu,name:account_payment_sepa_credit_transfer.menu_account_banking_sepa
+msgid "SEPA Credit Transfer Files"
+msgstr "Archivos Transferencia de créditos SEPA"
+
+#. module: account_payment_sepa_credit_transfer
+#: help:banking.export.sepa,batch_booking:0
+#: help:banking.export.sepa.wizard,batch_booking:0
+msgid "If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file."
+msgstr "If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file."
+
+#. module: account_payment_sepa_credit_transfer
+#: field:banking.export.sepa.wizard,file:0
+msgid "File"
+msgstr "Archivo"
+
+#. module: account_payment_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: account_payment_sepa_credit_transfer
+#: field:banking.export.sepa,create_date:0
+msgid "Generation Date"
+msgstr "Fecha de creación"
+

=== added file 'account_payment_sepa_credit_transfer/i18n/fr.po'
--- account_payment_sepa_credit_transfer/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/i18n/fr.po	2014-02-09 15:13:05 +0000
@@ -0,0 +1,207 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_banking_sepa_credit_transfer
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-12-23 22:52+0000\n"
+"PO-Revision-Date: 2013-12-23 22:52+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa.wizard,state:0
+msgid "Create"
+msgstr "Créer"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,nb_transactions:0
+#: field:banking.export.sepa.wizard,nb_transactions:0
+msgid "Number of Transactions"
+msgstr "Nombre de transactions"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,filename:0
+#: field:banking.export.sepa.wizard,filename:0
+msgid "Filename"
+msgstr "Nom du fichier"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,state:0
+#: field:banking.export.sepa.wizard,state:0
+msgid "State"
+msgstr "État"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Draft"
+msgstr "Brouillon"
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa.wizard,charge_bearer:0
+msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
+msgstr "Suivant le niveau de service : la répartition des frais bancaires suit les règles pré-établies dans le schema ou dans le contrat avec la banque (les messages SEPA Core doivent utiliser ce paramètre). Partagés : les frais bancaires côté débiteur sont à la charge du débiteur, les frais bancaires côté créancier sont à la charge du créancier. Supportés par le créancier : tous les frais bancaires sont à la charge du créancier. Supportés par le débiteur : tous les frais bancaires sont à la charge du débiteur."
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Shared"
+msgstr "Partagé"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,batch_booking:0
+#: field:banking.export.sepa.wizard,batch_booking:0
+msgid "Batch Booking"
+msgstr "Débit groupé"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Sent"
+msgstr "Envoyé"
+
+#. module: account_banking_sepa_credit_transfer
+#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard
+msgid "Export SEPA Credit Transfer File"
+msgstr "Exporte le fichier de virement SEPA"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa:0
+msgid "SEPA Credit Transfer"
+msgstr "Virement SEPA"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa.wizard,state:0
+msgid "Finish"
+msgstr "Finir"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Reconciled"
+msgstr "Réconcilié"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Following Service Level"
+msgstr "Suivant le niveau de service"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Borne by Creditor"
+msgstr "Supportés par le destinataire"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Validate"
+msgstr "Valider"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Generate"
+msgstr "Générer"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Borne by Debtor"
+msgstr "Supportés par l'émetteur"
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:128
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:245
+#, python-format
+msgid "Error:"
+msgstr "Erreur :"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,total_amount:0
+#: field:banking.export.sepa.wizard,total_amount:0
+msgid "Total Amount"
+msgstr "Montant total"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,charge_bearer:0
+#: field:banking.export.sepa.wizard,charge_bearer:0
+msgid "Charge Bearer"
+msgstr "Répartition des frais"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "SEPA File Generation"
+msgstr "Génération du fichier SEPA"
+
+#. module: account_banking_sepa_credit_transfer
+#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa
+msgid "SEPA export"
+msgstr "Export SEPA"
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:246
+#, python-format
+msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')."
+msgstr "Compte bancaire manquant sur la facture '%s' (référence de la ligne de paiement : '%s')."
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,file:0
+#: field:banking.export.sepa.wizard,file_id:0
+msgid "SEPA XML File"
+msgstr "Fichier SEPA XML"
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa,charge_bearer:0
+msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
+msgstr "Suivant le niveau de service : la répartition des frais bancaires suit les règles pré-établies dans le schema ou dans le contrat avec la banque (les messages SEPA Core doivent utiliser ce paramètre). Partagés : les frais bancaires côté débiteur sont à la charge du débiteur, les frais bancaires côté créancier sont à la charge du créancier. Supportés par le créancier : tous les frais bancaires sont à la charge du créancier. Supportés par le débiteur : tous les frais bancaires sont à la charge du débiteur."
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:129
+#, python-format
+msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'."
+msgstr "Le code du Type de paiement '%s' n'est pas supporté. Les seuls codes de Type de paiement supportés pour les virements SEPA sont 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' et 'pain.001.001.05'."
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa:0
+#: field:banking.export.sepa,payment_order_ids:0
+#: field:banking.export.sepa.wizard,payment_order_ids:0
+msgid "Payment Orders"
+msgstr "Ordres de paiement"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa:0
+msgid "General Information"
+msgstr "Informations générales"
+
+#. module: account_banking_sepa_credit_transfer
+#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order
+#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa
+#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa
+msgid "SEPA Credit Transfer Files"
+msgstr "Fichiers de virement SEPA"
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa,batch_booking:0
+#: help:banking.export.sepa.wizard,batch_booking:0
+msgid "If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file."
+msgstr "Si coché, le relevé de compte ne comportera qu'une ligne de débit pour tous les virements du fichier SEPA XML ; si non coché, le relevé de compte comportera une ligne de débit pour chaque virement du fichier SEPA XML."
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa.wizard,file:0
+msgid "File"
+msgstr "Fichier"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,create_date:0
+msgid "Generation Date"
+msgstr "Date de génération"
+

=== added file 'account_payment_sepa_credit_transfer/i18n/nl.po'
--- account_payment_sepa_credit_transfer/i18n/nl.po	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/i18n/nl.po	2014-02-09 15:13:05 +0000
@@ -0,0 +1,405 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* account_banking_sepa_credit_transfer
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-13 09:13+0000\n"
+"PO-Revision-Date: 2013-12-03 11:49+0000\n"
+"Last-Translator: Jan Jurkus (GCE CAD-Service) <ict@xxxxxxxxxxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-12-04 05:59+0000\n"
+"X-Generator: Launchpad (build 16861)\n"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,prefered_exec_date:0
+#: field:banking.export.sepa.wizard,prefered_exec_date:0
+msgid "Prefered Execution Date"
+msgstr "Voorkeurs uitvoerdatum"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa.wizard,state:0
+msgid "Create"
+msgstr "Aanmaken"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,nb_transactions:0
+#: field:banking.export.sepa.wizard,nb_transactions:0
+msgid "Number of Transactions"
+msgstr "Aantal transacties"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,filename:0
+#: field:banking.export.sepa.wizard,filename:0
+msgid "Filename"
+msgstr "Bestandsnaam"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,state:0
+#: field:banking.export.sepa.wizard,state:0
+msgid "State"
+msgstr "Status"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Draft"
+msgstr "Concept"
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa.wizard,charge_bearer:0
+msgid ""
+"Following service level : transaction charges are to be applied following "
+"the rules agreed in the service level and/or scheme (SEPA Core messages must "
+"use this). Shared : transaction charges on the debtor side are to be borne "
+"by the debtor, transaction charges on the creditor side are to be borne by "
+"the creditor. Borne by creditor : all transaction charges are to be borne by "
+"the creditor. Borne by debtor : all transaction charges are to be borne by "
+"the debtor."
+msgstr ""
+"Volg service level: Transactie kosten worden toegepast volgens de "
+"afgesproken regels in het service level en/of schema (Voor SEPA berichten "
+"deze gebruiken). Gedeeld : De transactiekosten aan de debiteur zijde zijn "
+"voor de schuldeiser, transactiekosten aan de crediteur kant zijn voor de "
+"schuldenaar. Rekening van de schuldenaar: Alle transactie kosten zijn voor "
+"rekening van de schuldenaar. Rekening van de schuldeiser: Alle transactie "
+"kosten zijn voor rekening van de schuldeiser."
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:117
+#, python-format
+msgid ""
+"Cannot compute the '%s' of the Payment Line with Invoice Reference '%s'."
+msgstr ""
+"Niet mogelijk de '%s' van de betaalregel te berekenen met factuurreferentie "
+"'%s'."
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Shared"
+msgstr "Gedeeld"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,batch_booking:0
+#: field:banking.export.sepa.wizard,batch_booking:0
+msgid "Batch Booking"
+msgstr "Bach verwerking"
+
+#. module: account_banking_sepa_credit_transfer
+#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard
+msgid "Export SEPA Credit Transfer XML file"
+msgstr "Exporteer SEPA XML overschrijvingsbestand"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa:0
+msgid "SEPA Credit Transfer"
+msgstr "SEPA overschrijving"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa.wizard,state:0
+msgid "Finish"
+msgstr "Gereed"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Reconciled"
+msgstr "Afgeletterd"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Following Service Level"
+msgstr "Volg service level"
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Borne by Creditor"
+msgstr "Rekening van schuldeiser"
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:122
+#, python-format
+msgid "Cannot compute the '%s'."
+msgstr "Niet mogelijk de '%s' te berekenen."
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:126
+#, python-format
+msgid "The type of the field '%s' is %s. It should be a string or unicode."
+msgstr ""
+"Het veldsoort van het veld '%s' is %s. Het moet een string of unicode soort "
+"zijn."
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,state:0
+msgid "Sent"
+msgstr "Verzonden"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Validate"
+msgstr "Bevestig"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Generate"
+msgstr "Genereer"
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:169
+#, python-format
+msgid ""
+"The generated XML file is not valid against the official XML Schema "
+"Definition. The generated XML file and the full error have been written in "
+"the server logs. Here is the error, which may give you an idea on the cause "
+"of the problem : %s"
+msgstr ""
+"Het gegenereerde XML bestand is niet geldig volgens de officiële XML schema "
+"definities. Het gegenereerde XML bestand en de volledige fout zijn "
+"weggeschreven in de server log bestanden. Hier is de fout, wat u een idee "
+"kunt geven over de oorzaak van het probleem: %s\""
+
+#. module: account_banking_sepa_credit_transfer
+#: selection:banking.export.sepa,charge_bearer:0
+#: selection:banking.export.sepa.wizard,charge_bearer:0
+msgid "Borne by Debtor"
+msgstr "Rekening van schuldenaar"
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:116
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:121
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:130
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:168
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:206
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:350
+#, python-format
+msgid "Error:"
+msgstr "Fout:"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,total_amount:0
+#: field:banking.export.sepa.wizard,total_amount:0
+msgid "Total Amount"
+msgstr "Totaalbedrag"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,charge_bearer:0
+#: field:banking.export.sepa.wizard,charge_bearer:0
+msgid "Charge Bearer"
+msgstr "Kostenverdeling"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "SEPA File Generation"
+msgstr "SEPA bestand genereren"
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:125
+#, python-format
+msgid "Field type error:"
+msgstr "Veldsoort fout:"
+
+#. module: account_banking_sepa_credit_transfer
+#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa
+msgid "SEPA export"
+msgstr "SEPA export"
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:351
+#, python-format
+msgid ""
+"Missing Bank Account on invoice '%s' (payment order line reference '%s')."
+msgstr ""
+"Ontbrekende bankrekening op factuur '%s' (betaalregel referentie '%s')"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,file:0
+#: field:banking.export.sepa.wizard,file_id:0
+msgid "SEPA XML File"
+msgstr "SEPA XML bestand"
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:131
+#, python-format
+msgid "The '%s' is empty or 0. It should have a non-null value."
+msgstr "De '%s' is leeg of 0. Het mag geen lege of nul waarde hebben."
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa,charge_bearer:0
+msgid ""
+"Following service level : transaction charges are to be applied following "
+"the rules agreed in the service level and/or scheme (SEPA Core messages must "
+"use this). Shared : transaction charges on the creditor side are to be borne "
+"by the creditor, transaction charges on the debtor side are to be borne by "
+"the debtor. Borne by creditor : all transaction charges are to be borne by "
+"the creditor. Borne by debtor : all transaction charges are to be borne by "
+"the debtor."
+msgstr ""
+"Volg service level: Transactie kosten worden toegepast volgens de "
+"afgesproken regels in het service level en/of schema (Voor SEPA berichten "
+"deze gebruiken). Gedeeld : De transactiekosten aan de crediteur zijde zijn "
+"voor de schuldenaar, transactiekosten aan de debiteur kant zijn voor de "
+"schuldeiser. Rekening van de schuldenaar: Alle transactie kosten zijn voor "
+"rekening van de schuldenaar. Rekening van de schuldeiser: Alle transactie "
+"kosten zijn voor rekening van de schuldeiser."
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:207
+#, python-format
+msgid ""
+"Payment Type Code '%s' is not supported. The only Payment Type Codes "
+"supported for SEPA Credit Transfers are 'pain.001.001.02', "
+"'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'."
+msgstr ""
+"Betaal type code '%s' wordt niet ondersteund. De enige betaal type codes "
+"voor SEPA credit boekingen zijn 'pain.001.001.02', 'pain.001.001.03' en "
+"'pain.001.001.04'."
+
+#. module: account_banking_sepa_credit_transfer
+#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90
+#, python-format
+msgid "This IBAN is not valid : %s"
+msgstr "Deze IBAN is niet geldig : %s"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa:0
+#: field:banking.export.sepa,payment_order_ids:0
+#: field:banking.export.sepa.wizard,payment_order_ids:0
+msgid "Payment Orders"
+msgstr "Betaalopdrachten"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa:0
+msgid "General Information"
+msgstr "Algemene informatie"
+
+#. module: account_banking_sepa_credit_transfer
+#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order
+#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa
+#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa
+msgid "SEPA Credit Transfer Files"
+msgstr "SEPA Credit Transfer bestanden"
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa,batch_booking:0
+#: help:banking.export.sepa.wizard,batch_booking:0
+msgid ""
+"If true, the bank statement will display only one debit line for all the "
+"wire transfers of the SEPA XML file ; if false, the bank statement will "
+"display one debit line per wire transfer of the SEPA XML file."
+msgstr ""
+"Indien aangevinkt zal het bankafschrift maar één debet regel weergeven voor "
+"alle overschrijvingen van het SEPA XML bestand. Indien uitgevinkt, zal het "
+"bankafschrift een debet regel weergeven per SEPA XML bestand."
+
+#. module: account_banking_sepa_credit_transfer
+#: help:banking.export.sepa.wizard,prefered_exec_date:0
+msgid ""
+"This is the date on which the file should be processed by the bank. Please "
+"keep in mind that banks only execute on working days and typically use a "
+"delay of two days between execution date and effective transfer date."
+msgstr ""
+"Dit is de datum waarop het bestand zou moeten worden verwerkt door de bank. "
+"Houdt u er rekening mee dat banken alleen op werkdagen de bestanden "
+"verwerken en veelal een vertraging hebben van twee dagen tussen de "
+"verwerkingsdatum en de effectieve overschrijfdatum."
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa.wizard,file:0
+msgid "File"
+msgstr "Bestand"
+
+#. module: account_banking_sepa_credit_transfer
+#: view:banking.export.sepa.wizard:0
+msgid "Cancel"
+msgstr "Annuleren"
+
+#. module: account_banking_sepa_credit_transfer
+#: field:banking.export.sepa,create_date:0
+msgid "Generation Date"
+msgstr "Aangemaakt op"
+
+#~ msgid "SEPA XML file"
+#~ msgstr "SEPA XML bestand"
+
+#~ msgid "Number of transactions"
+#~ msgstr "Aantal transacties"
+
+#~ msgid ""
+#~ "This is the message identification of the entire SEPA XML file. 35 "
+#~ "characters max."
+#~ msgstr ""
+#~ "Dit is een bericht identificatie van het gehele SEPA XML bestand. Maximaal "
+#~ "35 karakters."
+
+#~ msgid "Prefered execution date"
+#~ msgstr "Voorkeurs uitvoerdatum"
+
+#~ msgid "Generation date"
+#~ msgstr "Aanmaakdatum"
+
+#~ msgid "Message identification"
+#~ msgstr "Bericht identificatie"
+
+#~ msgid "Total amount"
+#~ msgstr "Totaal bedrag"
+
+#~ msgid "Borne by creditor"
+#~ msgstr "Rekening van schuldeiser"
+
+#~ msgid "Payment orders"
+#~ msgstr "Betaalopdrachten"
+
+#~ msgid "Generated SEPA Credit Transfer files"
+#~ msgstr "Gegenereerde SEPA overschrijfbestanden"
+
+#~ msgid "SEPA XML file generation"
+#~ msgstr "SEPA XML bestand generatie"
+
+#~ msgid "Reference for further communication"
+#~ msgstr "Referentie voor verdere communicatie"
+
+#~ msgid "Processing details"
+#~ msgstr "Verwerkings details"
+
+#~ msgid "Borne by debtor"
+#~ msgstr "Rekening van schuldenaar"
+
+#~ msgid "Payment order"
+#~ msgstr "Betaalopdracht"
+
+#~ msgid "Following service level"
+#~ msgstr "Volg service level"
+
+#~ msgid "Charge bearer"
+#~ msgstr "Kostenverdeling"
+
+#~ msgid ""
+#~ "Shared : transaction charges on the sender side are to be borne by the "
+#~ "debtor, transaction charges on the receiver side are to be borne by the "
+#~ "creditor (most transfers use this). Borne by creditor : all transaction "
+#~ "charges are to be borne by the creditor. Borne by debtor : all transaction "
+#~ "charges are to be borne by the debtor. Following service level : transaction "
+#~ "charges are to be applied following the rules agreed in the service level "
+#~ "and/or scheme."
+#~ msgstr ""
+#~ "Gedeeld : De transactiekosten aan de verzender kant zijn voor de "
+#~ "schuldeiser, transactiekosten aan de ontvanger kant zijn voor de schuldenaar "
+#~ "(deze keuze wordt het meest gebruikt). Rekening van de schuldenaar: Alle "
+#~ "transactie kosten zijn voor rekening van de schuldenaar. Rekening van de "
+#~ "schuldeiser: Alle transactie kosten zijn voor rekening van de schuldeiser. "
+#~ "Volg service level: Transactie kosten worden toegepast volgens de "
+#~ "afgesporken regels in het service level en/of schema."
+
+#~ msgid "Batch booking"
+#~ msgstr "Batch boeking"
+
+#~ msgid "Generated SEPA Credit Transfer XML files"
+#~ msgstr "Gengenereerde SEPA XML overschrijf bestanden"

=== added directory 'account_payment_sepa_credit_transfer/security'
=== added file 'account_payment_sepa_credit_transfer/security/ir.model.access.csv'
--- account_payment_sepa_credit_transfer/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/security/ir.model.access.csv	2014-02-09 15:13:05 +0000
@@ -0,0 +1,2 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_banking_export_sepa","Full access on banking.export.sepa","model_banking_export_sepa","account_payment.group_account_payment",1,1,1,1

=== added directory 'account_payment_sepa_credit_transfer/static'
=== added directory 'account_payment_sepa_credit_transfer/static/src'
=== added directory 'account_payment_sepa_credit_transfer/static/src/img'
=== added file 'account_payment_sepa_credit_transfer/static/src/img/icon.png'
Binary files account_payment_sepa_credit_transfer/static/src/img/icon.png	1970-01-01 00:00:00 +0000 and account_payment_sepa_credit_transfer/static/src/img/icon.png	2014-02-09 15:13:05 +0000 differ
=== added directory 'account_payment_sepa_credit_transfer/wizard'
=== added file 'account_payment_sepa_credit_transfer/wizard/__init__.py'
--- account_payment_sepa_credit_transfer/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/wizard/__init__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,23 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    SEPA Credit Transfer module for OpenERP
+#    Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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 . import export_sepa

=== added file 'account_payment_sepa_credit_transfer/wizard/export_sepa.py'
--- account_payment_sepa_credit_transfer/wizard/export_sepa.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/wizard/export_sepa.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,299 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    SEPA Credit Transfer module for OpenERP
+#    Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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
+from openerp.tools.translate import _
+from openerp import netsvc
+from lxml import etree
+
+
+class banking_export_sepa_wizard(orm.TransientModel):
+    _name = 'banking.export.sepa.wizard'
+    _inherit = ['banking.export.pain']
+    _description = 'Export SEPA Credit Transfer File'
+
+    _columns = {
+        'state': fields.selection([
+            ('create', 'Create'),
+            ('finish', 'Finish'),
+            ], 'State', readonly=True),
+        'batch_booking': fields.boolean(
+            'Batch Booking',
+            help="If true, the bank statement will display only one debit "
+            "line for all the wire transfers of the SEPA XML file ; if "
+            "false, the bank statement will display one debit line per wire "
+            "transfer of the SEPA XML file."),
+        'charge_bearer': fields.selection([
+            ('SLEV', 'Following Service Level'),
+            ('SHAR', 'Shared'),
+            ('CRED', 'Borne by Creditor'),
+            ('DEBT', 'Borne by Debtor'),
+            ], 'Charge Bearer', required=True,
+            help="Following service level : transaction charges are to be "
+            "applied following the rules agreed in the service level and/or "
+            "scheme (SEPA Core messages must use this). Shared : transaction "
+            "charges on the debtor side are to be borne by the debtor, "
+            "transaction charges on the creditor side are to be borne by "
+            "the creditor. Borne by creditor : all transaction charges are "
+            "to be borne by the creditor. Borne by debtor : all transaction "
+            "charges are to be borne by the debtor."),
+        'nb_transactions': fields.related(
+            'file_id', 'nb_transactions', type='integer',
+            string='Number of Transactions', readonly=True),
+        'total_amount': fields.related(
+            'file_id', 'total_amount', type='float', string='Total Amount',
+            readonly=True),
+        'file_id': fields.many2one(
+            'banking.export.sepa', 'SEPA XML File', readonly=True),
+        'file': fields.related(
+            'file_id', 'file', string="File", type='binary', readonly=True),
+        'filename': fields.related(
+            'file_id', 'filename', string="Filename", type='char',
+            size=256, readonly=True),
+        'payment_order_ids': fields.many2many(
+            'payment.order', 'wiz_sepa_payorders_rel', 'wizard_id',
+            'payment_order_id', 'Payment Orders', readonly=True),
+        }
+
+    _defaults = {
+        'charge_bearer': 'SLEV',
+        'state': 'create',
+        }
+
+    def create(self, cr, uid, vals, context=None):
+        payment_order_ids = context.get('active_ids', [])
+        vals.update({
+            'payment_order_ids': [[6, 0, payment_order_ids]],
+        })
+        return super(banking_export_sepa_wizard, self).create(
+            cr, uid, vals, context=context)
+
+    def create_sepa(self, cr, uid, ids, context=None):
+        '''
+        Creates the SEPA Credit Transfer file. That's the important code !
+        '''
+        if context is None:
+            context = {}
+        sepa_export = self.browse(cr, uid, ids[0], context=context)
+        pain_flavor = sepa_export.payment_order_ids[0].mode.type.code
+        convert_to_ascii = \
+            sepa_export.payment_order_ids[0].mode.convert_to_ascii
+        if pain_flavor == 'pain.001.001.02':
+            bic_xml_tag = 'BIC'
+            name_maxsize = 70
+            root_xml_tag = 'pain.001.001.02'
+        elif pain_flavor == 'pain.001.001.03':
+            bic_xml_tag = 'BIC'
+            # size 70 -> 140 for <Nm> with pain.001.001.03
+            # BUT the European Payment Council, in the document
+            # "SEPA Credit Transfer Scheme Customer-to-bank
+            # Implementation guidelines" v6.0 available on
+            # http://www.europeanpaymentscouncil.eu/knowledge_bank.cfm
+            # says that 'Nm' should be limited to 70
+            # so we follow the "European Payment Council"
+            # and we put 70 and not 140
+            name_maxsize = 70
+            root_xml_tag = 'CstmrCdtTrfInitn'
+        elif pain_flavor == 'pain.001.001.04':
+            bic_xml_tag = 'BICFI'
+            name_maxsize = 140
+            root_xml_tag = 'CstmrCdtTrfInitn'
+        elif pain_flavor == 'pain.001.001.05':
+            bic_xml_tag = 'BICFI'
+            name_maxsize = 140
+            root_xml_tag = 'CstmrCdtTrfInitn'
+
+        else:
+            raise orm.except_orm(
+                _('Error:'),
+                _("Payment Type Code '%s' is not supported. The only "
+                    "Payment Type Codes supported for SEPA Credit Transfers "
+                    "are 'pain.001.001.02', 'pain.001.001.03', "
+                    "'pain.001.001.04' and 'pain.001.001.05'.")
+                % pain_flavor)
+
+        gen_args = {
+            'bic_xml_tag': bic_xml_tag,
+            'name_maxsize': name_maxsize,
+            'convert_to_ascii': convert_to_ascii,
+            'payment_method': 'TRF',
+            'pain_flavor': pain_flavor,
+            'sepa_export': sepa_export,
+            'file_obj': self.pool['banking.export.sepa'],
+            'pain_xsd_file':
+            'account_payment_sepa_credit_transfer/data/%s.xsd'
+            % pain_flavor,
+        }
+
+        pain_ns = {
+            'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
+            None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor,
+            }
+
+        xml_root = etree.Element('Document', nsmap=pain_ns)
+        pain_root = etree.SubElement(xml_root, root_xml_tag)
+        pain_03_to_05 = \
+            ['pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05']
+
+        # A. Group header
+        group_header_1_0, nb_of_transactions_1_6, control_sum_1_7 = \
+            self.generate_group_header_block(
+                cr, uid, pain_root, gen_args, context=context)
+
+        transactions_count_1_6 = 0
+        total_amount = 0.0
+        amount_control_sum_1_7 = 0.0
+        lines_per_group = {}
+        # key = (requested_date, priority)
+        # values = list of lines as object
+        today = fields.date.context_today(self, cr, uid, context=context)
+        for payment_order in sepa_export.payment_order_ids:
+            total_amount = total_amount + payment_order.total
+            for line in payment_order.line_ids:
+                priority = line.priority
+                if payment_order.date_prefered == 'due':
+                    requested_date = line.ml_maturity_date or today
+                elif payment_order.date_prefered == 'fixed':
+                    requested_date = payment_order.date_scheduled or today
+                else:
+                    requested_date = today
+                key = (requested_date, priority)
+                if key in lines_per_group:
+                    lines_per_group[key].append(line)
+                else:
+                    lines_per_group[key] = [line]
+                # Write requested_date on 'Payment date' of the pay line
+                if requested_date != line.date:
+                    self.pool['payment.line'].write(
+                        cr, uid, line.id,
+                        {'date': requested_date}, context=context)
+
+        for (requested_date, priority), lines in lines_per_group.items():
+            # B. Payment info
+            payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5 = \
+                self.generate_start_payment_info_block(
+                    cr, uid, pain_root,
+                    "sepa_export.payment_order_ids[0].reference + '-' "
+                    "+ requested_date.replace('-', '')  + '-' + priority",
+                    priority, False, False, requested_date, {
+                        'sepa_export': sepa_export,
+                        'priority': priority,
+                        'requested_date': requested_date,
+                    }, gen_args, context=context)
+
+            self.generate_party_block(
+                cr, uid, payment_info_2_0, 'Dbtr', 'B',
+                'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.'
+                'name',
+                'sepa_export.payment_order_ids[0].mode.bank_id.acc_number',
+                'sepa_export.payment_order_ids[0].mode.bank_id.bank.bic',
+                {'sepa_export': sepa_export},
+                gen_args, context=context)
+
+            charge_bearer_2_24 = etree.SubElement(payment_info_2_0, 'ChrgBr')
+            charge_bearer_2_24.text = sepa_export.charge_bearer
+
+            transactions_count_2_4 = 0
+            amount_control_sum_2_5 = 0.0
+            for line in lines:
+                transactions_count_1_6 += 1
+                transactions_count_2_4 += 1
+                # C. Credit Transfer Transaction Info
+                credit_transfer_transaction_info_2_27 = etree.SubElement(
+                    payment_info_2_0, 'CdtTrfTxInf')
+                payment_identification_2_28 = etree.SubElement(
+                    credit_transfer_transaction_info_2_27, 'PmtId')
+                end2end_identification_2_30 = etree.SubElement(
+                    payment_identification_2_28, 'EndToEndId')
+                end2end_identification_2_30.text = self._prepare_field(
+                    cr, uid, 'End to End Identification', 'line.name',
+                    {'line': line}, 35, gen_args=gen_args,
+                    context=context)
+                currency_name = self._prepare_field(
+                    cr, uid, 'Currency Code', 'line.currency.name',
+                    {'line': line}, 3, gen_args=gen_args,
+                    context=context)
+                amount_2_42 = etree.SubElement(
+                    credit_transfer_transaction_info_2_27, 'Amt')
+                instructed_amount_2_43 = etree.SubElement(
+                    amount_2_42, 'InstdAmt', Ccy=currency_name)
+                instructed_amount_2_43.text = '%.2f' % line.amount_currency
+                amount_control_sum_1_7 += line.amount_currency
+                amount_control_sum_2_5 += line.amount_currency
+
+                if not line.bank_id:
+                    raise orm.except_orm(
+                        _('Error:'),
+                        _("Missing Bank Account on invoice '%s' (payment "
+                            "order line reference '%s').")
+                        % (line.ml_inv_ref.number, line.name))
+                self.generate_party_block(
+                    cr, uid, credit_transfer_transaction_info_2_27, 'Cdtr',
+                    'C', 'line.partner_id.name', 'line.bank_id.acc_number',
+                    'line.bank_id.bank.bic', {'line': line}, gen_args,
+                    context=context)
+
+                self.generate_remittance_info_block(
+                    cr, uid, credit_transfer_transaction_info_2_27,
+                    line, gen_args, context=context)
+
+            if pain_flavor in pain_03_to_05:
+                nb_of_transactions_2_4.text = str(transactions_count_2_4)
+                control_sum_2_5.text = '%.2f' % amount_control_sum_2_5
+
+        if pain_flavor in pain_03_to_05:
+            nb_of_transactions_1_6.text = str(transactions_count_1_6)
+            control_sum_1_7.text = '%.2f' % amount_control_sum_1_7
+        else:
+            nb_of_transactions_1_6.text = str(transactions_count_1_6)
+            control_sum_1_7.text = '%.2f' % amount_control_sum_1_7
+
+        return self.finalize_sepa_file_creation(
+            cr, uid, ids, xml_root, total_amount, transactions_count_1_6,
+            gen_args, context=context)
+
+    def cancel_sepa(self, cr, uid, ids, context=None):
+        '''
+        Cancel the SEPA file: just drop the file
+        '''
+        sepa_export = self.browse(cr, uid, ids[0], context=context)
+        self.pool.get('banking.export.sepa').unlink(
+            cr, uid, sepa_export.file_id.id, context=context)
+        return {'type': 'ir.actions.act_window_close'}
+
+    def save_sepa(self, cr, uid, ids, context=None):
+        '''
+        Save the SEPA file: send the done signal to all payment
+        orders in the file. With the default workflow, they will
+        transition to 'done', while with the advanced workflow in
+        account_banking_payment they will transition to 'sent' waiting
+        reconciliation.
+        '''
+        sepa_export = self.browse(cr, uid, ids[0], context=context)
+        self.pool.get('banking.export.sepa').write(
+            cr, uid, sepa_export.file_id.id, {'state': 'sent'},
+            context=context)
+        wf_service = netsvc.LocalService('workflow')
+        for order in sepa_export.payment_order_ids:
+            wf_service.trg_validate(uid, 'payment.order', order.id, 'done', cr)
+        return {'type': 'ir.actions.act_window_close'}

=== added file 'account_payment_sepa_credit_transfer/wizard/export_sepa_view.xml'
--- account_payment_sepa_credit_transfer/wizard/export_sepa_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_credit_transfer/wizard/export_sepa_view.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
+  @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+<data>
+
+<record id="banking_export_sepa_wizard_view" model="ir.ui.view">
+    <field name="name">banking.export.sepa.wizard.view</field>
+    <field name="model">banking.export.sepa.wizard</field>
+    <field name="arch" type="xml">
+        <form string="SEPA File Generation">
+            <field name="state" invisible="True"/>
+            <group states="create">
+                <field name="batch_booking" />
+                <newline />
+                <field name="charge_bearer" />
+            </group>
+            <group states="finish">
+                <field name="total_amount" />
+                <field name="nb_transactions" />
+                <field name="file" filename="filename" />
+                <field name="filename" invisible="True"/>
+            </group>
+            <newline />
+            <button string="Generate" name="create_sepa" type="object" states="create"/>
+            <button string="Cancel" special="cancel" states="create"/>
+            <button string="Validate" name="save_sepa" type="object" states="finish"/>
+            <button string="Cancel" name="cancel_sepa" type="object" states="finish"/>
+            
+        </form>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added directory 'account_payment_sepa_direct_debit'
=== added file 'account_payment_sepa_direct_debit/__init__.py'
--- account_payment_sepa_direct_debit/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/__init__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    SEPA Direct Debit module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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 . import company
+from . import wizard
+from . import account_banking_sdd

=== added file 'account_payment_sepa_direct_debit/__openerp__.py'
--- account_payment_sepa_direct_debit/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/__openerp__.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,65 @@
+##############################################################################
+#
+#    SEPA Direct Debit module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#    Copyright (C) 2014 Acysos S.L. (<http://acysos.com>).
+#    @author: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+#
+#    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 Payment SEPA Direct Debit',
+    'summary': 'Create SEPA files for Direct Debit',
+    'version': '0.1',
+    'license': 'AGPL-3',
+    'author': 'Akretion',
+    'website': 'http://www.akretion.com',
+    'category': 'Banking addons',
+    'depends': ['account_payment_extension',
+                'account_payment_direct_debit',
+                'account_payment_pain_base'],
+    'external_dependencies': {
+        'python': ['unidecode', 'lxml'],
+        },
+    'data': [
+        'security/original_mandate_required_security.xml',
+        'account_banking_sdd_view.xml',
+        'sdd_mandate_view.xml',
+        'res_partner_bank_view.xml',
+        'account_payment_view.xml',
+        'company_view.xml',
+        'mandate_expire_cron.xml',
+        'account_invoice_view.xml',
+        'wizard/export_sdd_view.xml',
+        'data/payment_type_sdd.xml',
+        'data/mandate_reference_sequence.xml',
+        'security/ir.model.access.csv',
+    ],
+    'description': '''
+Module to export direct debit payment orders in SEPA XML file format.
+
+SEPA PAIN (PAyment INitiation) is the new european standard for Customer-to-Bank payment instructions. This module implements SEPA Direct Debit (SDD), more specifically PAIN versions 008.001.02, 008.001.03 and 008.001.04. It is part of the ISO 20022 standard, available on http://www.iso20022.org.
+
+The Implementation Guidelines for SEPA Direct Debit published by the European Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN version 008.001.02. So if you don't know which version your bank supports, you should try version 008.001.02 first.
+
+This module uses the framework provided by the banking addons, cf https://launchpad.net/banking-addons
+
+Please contact Alexis de Lattre from Akretion <alexis.delattre@xxxxxxxxxxxx> for any help or question about this module.
+Adapted to account_payment_extension by Acysos S.L. <info@xxxxxxxxxx>
+    ''',
+    'active': False,
+    'installable': True,
+}

=== added file 'account_payment_sepa_direct_debit/account_banking_sdd.py'
--- account_payment_sepa_direct_debit/account_banking_sdd.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/account_banking_sdd.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,424 @@
+##############################################################################
+#
+#    SEPA Direct Debit module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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
+from openerp.tools.translate import _
+from openerp.addons.decimal_precision import decimal_precision as dp
+from unidecode import unidecode
+from datetime import datetime
+from dateutil.relativedelta import relativedelta
+import logging
+
+NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY = 36
+
+logger = logging.getLogger(__name__)
+
+
+class banking_export_sdd(orm.Model):
+    '''SEPA Direct Debit export'''
+    _name = 'banking.export.sdd'
+    _description = __doc__
+    _rec_name = 'filename'
+
+    def _generate_filename(self, cr, uid, ids, name, arg, context=None):
+        res = {}
+        for sepa_file in self.browse(cr, uid, ids, context=context):
+            ref = sepa_file.payment_order_ids[0].reference
+            if ref:
+                label = unidecode(ref.replace('/', '-'))
+            else:
+                label = 'error'
+            res[sepa_file.id] = 'sdd_%s.xml' % label
+        return res
+
+    _columns = {
+        'payment_order_ids': fields.many2many(
+            'payment.order',
+            'account_payment_order_sdd_rel',
+            'banking_export_sepa_id', 'account_order_id',
+            'Payment Orders',
+            readonly=True),
+        'nb_transactions': fields.integer(
+            'Number of Transactions', readonly=True),
+        'total_amount': fields.float(
+            'Total Amount', digits_compute=dp.get_precision('Account'),
+            readonly=True),
+        'batch_booking': fields.boolean(
+            'Batch Booking', readonly=True,
+            help="If true, the bank statement will display only one credit "
+            "line for all the direct debits of the SEPA file ; if false, "
+            "the bank statement will display one credit line per direct "
+            "debit of the SEPA file."),
+        'charge_bearer': fields.selection([
+            ('SLEV', 'Following Service Level'),
+            ('SHAR', 'Shared'),
+            ('CRED', 'Borne by Creditor'),
+            ('DEBT', 'Borne by Debtor'),
+            ], 'Charge Bearer', readonly=True,
+            help="Following service level : transaction charges are to be "
+            "applied following the rules agreed in the service level and/or "
+            "scheme (SEPA Core messages must use this). Shared : "
+            "transaction charges on the creditor side are to be borne by "
+            "the creditor, transaction charges on the debtor side are to be "
+            "borne by the debtor. Borne by creditor : all transaction "
+            "charges are to be borne by the creditor. Borne by debtor : "
+            "all transaction charges are to be borne by the debtor."),
+        'create_date': fields.datetime('Generation Date', readonly=True),
+        'file': fields.binary('SEPA File', readonly=True),
+        'filename': fields.function(
+            _generate_filename, type='char', size=256,
+            string='Filename', readonly=True, store=True),
+        'state': fields.selection([
+            ('draft', 'Draft'),
+            ('sent', 'Sent'),
+            ('done', 'Reconciled'),
+            ], 'State', readonly=True),
+    }
+
+    _defaults = {
+        'state': 'draft',
+    }
+
+
+class sdd_mandate(orm.Model):
+    '''SEPA Direct Debit Mandate'''
+    _name = 'sdd.mandate'
+    _description = __doc__
+    _rec_name = 'unique_mandate_reference'
+    _inherit = ['mail.thread']
+    _order = 'signature_date desc'
+    _track = {
+        'state': {
+            'account_banking_sepa_direct_debit.mandate_valid':
+            lambda self, cr, uid, obj, ctx=None:
+            obj['state'] == 'valid',
+            'account_banking_sepa_direct_debit.mandate_expired':
+            lambda self, cr, uid, obj, ctx=None:
+            obj['state'] == 'expired',
+            'account_banking_sepa_direct_debit.mandate_cancel':
+            lambda self, cr, uid, obj, ctx=None:
+            obj['state'] == 'cancel',
+            },
+        'recurrent_sequence_type': {
+            'account_banking_sepa_direct_debit.recurrent_sequence_type_first':
+            lambda self, cr, uid, obj, ctx=None:
+            obj['recurrent_sequence_type'] == 'first',
+            'account_banking_sepa_direct_debit.'
+            'recurrent_sequence_type_recurring':
+            lambda self, cr, uid, obj, ctx=None:
+            obj['recurrent_sequence_type'] == 'recurring',
+            'account_banking_sepa_direct_debit.recurrent_sequence_type_final':
+            lambda self, cr, uid, obj, ctx=None:
+            obj['recurrent_sequence_type'] == 'final',
+            }
+        }
+
+    _columns = {
+        'partner_bank_id': fields.many2one(
+            'res.partner.bank', 'Bank Account', track_visibility='onchange'),
+        'partner_id': fields.related(
+            'partner_bank_id', 'partner_id', type='many2one',
+            relation='res.partner', string='Partner', readonly=True),
+        'company_id': fields.many2one('res.company', 'Company', required=True),
+        'unique_mandate_reference': fields.char(
+            'Unique Mandate Reference', size=35, readonly=True,
+            track_visibility='always'),
+        'type': fields.selection([
+            ('recurrent', 'Recurrent'),
+            ('oneoff', 'One-Off'),
+            ], 'Type of Mandate', required=True, track_visibility='always'),
+        'recurrent_sequence_type': fields.selection([
+            ('first', 'First'),
+            ('recurring', 'Recurring'),
+            ('final', 'Final'),
+            ], 'Sequence Type for Next Debit', track_visibility='onchange',
+            help="This field is only used for Recurrent mandates, not for "
+            "One-Off mandates."),
+        'signature_date': fields.date(
+            'Date of Signature of the Mandate', track_visibility='onchange'),
+        'scan': fields.binary('Scan of the Mandate'),
+        'last_debit_date': fields.date(
+            'Date of the Last Debit', readonly=True),
+        'state': fields.selection([
+            ('draft', 'Draft'),
+            ('valid', 'Valid'),
+            ('expired', 'Expired'),
+            ('cancel', 'Cancelled'),
+            ], 'Status',
+            help="Only valid mandates can be used in a payment line. A "
+            "cancelled mandate is a mandate that has been cancelled by "
+            "the customer. A one-off mandate expires after its first use. "
+            "A recurrent mandate expires after it's final use or if it "
+            "hasn't been used for 36 months."),
+        'payment_line_ids': fields.one2many(
+            'payment.line', 'sdd_mandate_id', "Related Payment Lines"),
+        'sepa_migrated': fields.boolean(
+            'Migrated to SEPA', track_visibility='onchange',
+            help="If this field is not active, the mandate section of the "
+            "next direct debit file that include this mandate will contain "
+            "the 'Original Mandate Identification' and the 'Original "
+            "Creditor Scheme Identification'. This is required in a few "
+            "countries (Belgium for instance), but not in all countries. "
+            "If this is not required in your country, you should keep this "
+            "field always active."),
+        'original_mandate_identification': fields.char(
+            'Original Mandate Identification', size=35,
+            track_visibility='onchange',
+            help="When the field 'Migrated to SEPA' is not active, this "
+            "field will be used as the Original Mandate Identification in "
+            "the Direct Debit file."),
+        }
+
+    _defaults = {
+        'company_id': lambda self, cr, uid, context:
+        self.pool['res.company']._company_default_get(
+            cr, uid, 'sdd.mandate', context=context),
+        'unique_mandate_reference': lambda self, cr, uid, ctx:
+        self.pool['ir.sequence'].get(cr, uid, 'sdd.mandate.reference'),
+        'state': 'draft',
+        'sepa_migrated': True,
+    }
+
+    _sql_constraints = [(
+        'mandate_ref_company_uniq',
+        'unique(unique_mandate_reference, company_id)',
+        'A Mandate with the same reference already exists for this company !'
+        )]
+
+    def _check_sdd_mandate(self, cr, uid, ids):
+        for mandate in self.browse(cr, uid, ids):
+            if (mandate.signature_date and
+                    mandate.signature_date >
+                    datetime.today().strftime('%Y-%m-%d')):
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("The date of signature of mandate '%s' is in the "
+                        "future !")
+                    % mandate.unique_mandate_reference)
+            if mandate.state == 'valid' and not mandate.signature_date:
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("Cannot validate the mandate '%s' without a date of "
+                        "signature.")
+                    % mandate.unique_mandate_reference)
+            if mandate.state == 'valid' and not mandate.partner_bank_id:
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("Cannot validate the mandate '%s' because it is not "
+                        "attached to a bank account.")
+                    % mandate.unique_mandate_reference)
+
+            if (mandate.signature_date and mandate.last_debit_date and
+                    mandate.signature_date > mandate.last_debit_date):
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("The mandate '%s' can't have a date of last debit "
+                        "before the date of signature.")
+                    % mandate.unique_mandate_reference)
+            if (mandate.type == 'recurrent'
+                    and not mandate.recurrent_sequence_type):
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("The recurrent mandate '%s' must have a sequence type.")
+                    % mandate.unique_mandate_reference)
+            if (mandate.type == 'recurrent' and not mandate.sepa_migrated
+                    and mandate.recurrent_sequence_type != 'first'):
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("The recurrent mandate '%s' which is not marked as "
+                        "'Migrated to SEPA' must have its recurrent sequence "
+                        "type set to 'First'.")
+                    % mandate.unique_mandate_reference)
+            if (mandate.type == 'recurrent' and not mandate.sepa_migrated
+                    and not mandate.original_mandate_identification):
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("You must set the 'Original Mandate Identification' "
+                        "on the recurrent mandate '%s' which is not marked "
+                        "as 'Migrated to SEPA'.")
+                    % mandate.unique_mandate_reference)
+        return True
+
+    _constraints = [
+        (_check_sdd_mandate, "Error msg in raise", [
+            'last_debit_date', 'signature_date', 'state', 'partner_bank_id',
+            'type', 'recurrent_sequence_type', 'sepa_migrated',
+            'original_mandate_identification',
+            ]),
+    ]
+
+    def mandate_type_change(self, cr, uid, ids, type):
+        if type == 'recurrent':
+            recurrent_sequence_type = 'first'
+        else:
+            recurrent_sequence_type = False
+        res = {'value': {'recurrent_sequence_type': recurrent_sequence_type}}
+        return res
+
+    def mandate_partner_bank_change(
+            self, cr, uid, ids, partner_bank_id, type, recurrent_sequence_type,
+            last_debit_date, state):
+        res = {'value': {}}
+        if partner_bank_id:
+            partner_bank_read = self.pool['res.partner.bank'].read(
+                cr, uid, partner_bank_id, ['partner_id'])['partner_id']
+            if partner_bank_read:
+                res['value']['partner_id'] = partner_bank_read[0]
+        if (state == 'valid' and partner_bank_id
+                and type == 'recurrent'
+                and recurrent_sequence_type != 'first'):
+            res['value']['recurrent_sequence_type'] = 'first'
+            res['warning'] = {
+                'title': _('Mandate update'),
+                'message': _(
+                    "As you changed the bank account attached to this "
+                    "mandate, the 'Sequence Type' has been set back to "
+                    "'First'."),
+                }
+        return res
+
+    def validate(self, cr, uid, ids, context=None):
+        to_validate_ids = []
+        for mandate in self.browse(cr, uid, ids, context=context):
+            assert mandate.state == 'draft', 'Mandate should be in draft state'
+            to_validate_ids.append(mandate.id)
+        self.write(
+            cr, uid, to_validate_ids, {'state': 'valid'}, context=context)
+        return True
+
+    def cancel(self, cr, uid, ids, context=None):
+        to_cancel_ids = []
+        for mandate in self.browse(cr, uid, ids, context=context):
+            assert mandate.state in ('draft', 'valid'),\
+                'Mandate should be in draft or valid state'
+            to_cancel_ids.append(mandate.id)
+        self.write(
+            cr, uid, to_cancel_ids, {'state': 'cancel'}, context=context)
+        return True
+
+    def _sdd_mandate_set_state_to_expired(self, cr, uid, context=None):
+        logger.info('Searching for SDD Mandates that must be set to Expired')
+        expire_limit_date = datetime.today() + \
+            relativedelta(months=-NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY)
+        expire_limit_date_str = expire_limit_date.strftime('%Y-%m-%d')
+        expired_mandate_ids = self.search(cr, uid, [
+            '|',
+            ('last_debit_date', '=', False),
+            ('last_debit_date', '<=', expire_limit_date_str),
+            ('state', '=', 'valid'),
+            ('signature_date', '<=', expire_limit_date_str),
+            ], context=context)
+        if expired_mandate_ids:
+            self.write(
+                cr, uid, expired_mandate_ids, {'state': 'expired'},
+                context=context)
+            logger.info(
+                'The following SDD Mandate IDs has been set to expired: %s'
+                % expired_mandate_ids)
+        else:
+            logger.info('0 SDD Mandates must be set to Expired')
+        return True
+
+
+class res_partner_bank(orm.Model):
+    _inherit = 'res.partner.bank'
+
+    _columns = {
+        'sdd_mandate_ids': fields.one2many(
+            'sdd.mandate', 'partner_bank_id', 'SEPA Direct Debit Mandates'),
+        }
+
+
+class payment_line(orm.Model):
+    _inherit = 'payment.line'
+
+    _columns = {
+        'sdd_mandate_id': fields.many2one(
+            'sdd.mandate', 'SEPA Direct Debit Mandate',
+            domain=[('state', '=', 'valid')]),
+        }
+
+    def create(self, cr, uid, vals, context=None):
+        '''If the customer invoice has a mandate, take it
+        otherwise, take the first valid mandate of the bank account'''
+        if context is None:
+            context = {}
+        if not vals:
+            vals = {}
+        partner_bank_id = vals.get('bank_id')
+        move_line_id = vals.get('move_line_id')
+        if (context.get('type') == 'receivable'
+                and 'sdd_mandate_id' not in vals):
+            if move_line_id:
+                line = self.pool['account.move.line'].browse(
+                    cr, uid, move_line_id, context=context)
+                if (line.invoice and line.invoice.type == 'out_invoice'
+                        and line.invoice.sdd_mandate_id):
+                    vals.update({
+                        'sdd_mandate_id': line.invoice.sdd_mandate_id.id,
+                        'bank_id':
+                        line.invoice.sdd_mandate_id.partner_bank_id.id,
+                    })
+            if partner_bank_id and 'sdd_mandate_id' not in vals:
+                mandate_ids = self.pool['sdd.mandate'].search(cr, uid, [
+                    ('partner_bank_id', '=', partner_bank_id),
+                    ('state', '=', 'valid'),
+                    ], context=context)
+                if mandate_ids:
+                    vals['sdd_mandate_id'] = mandate_ids[0]
+        return super(payment_line, self).create(cr, uid, vals, context=context)
+
+    def _check_mandate_bank_link(self, cr, uid, ids):
+        for payline in self.browse(cr, uid, ids):
+            if (payline.sdd_mandate_id and payline.bank_id
+                    and payline.sdd_mandate_id.partner_bank_id.id !=
+                    payline.bank_id.id):
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("The payment line with reference '%s' has the bank "
+                        "account '%s' which is not attached to the mandate "
+                        "'%s' (this mandate is attached to the bank account "
+                        "'%s').") % (
+                        payline.name,
+                        self.pool['res.partner.bank'].name_get(
+                            cr, uid, [payline.bank_id.id])[0][1],
+                        payline.sdd_mandate_id.unique_mandate_reference,
+                        self.pool['res.partner.bank'].name_get(
+                            cr, uid,
+                            [payline.sdd_mandate_id.partner_bank_id.id])[0][1],
+                    ))
+        return True
+
+    _constraints = [
+        (_check_mandate_bank_link, 'Error msg in raise',
+            ['sdd_mandate_id', 'bank_id']),
+    ]
+
+
+class account_invoice(orm.Model):
+    _inherit = 'account.invoice'
+
+    _columns = {
+        'sdd_mandate_id': fields.many2one(
+            'sdd.mandate', 'SEPA Direct Debit Mandate',
+            domain=[('state', '=', 'valid')], readonly=True,
+            states={'draft': [('readonly', False)]})
+        }

=== added file 'account_payment_sepa_direct_debit/account_banking_sdd_view.xml'
--- account_payment_sepa_direct_debit/account_banking_sdd_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/account_banking_sdd_view.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2013 Akretion (http://www.akretion.com)
+  @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+<data>
+
+<record id="view_banking_export_sdd_form" model="ir.ui.view">
+    <field name="name">account.banking.export.sdd.form</field>
+    <field name="model">banking.export.sdd</field>
+    <field name="arch" type="xml">
+        <form string="SEPA Direct Debit">
+            <notebook>
+                <page string="General Information">
+                    <field name="total_amount" />
+                    <field name="nb_transactions" />
+                    <field name="batch_booking" />
+                    <field name="charge_bearer"/>
+                    <field name="create_date" />
+                    <newline />
+                    <field name="file" filename="filename"/>
+                    <field name="filename" invisible="True"/>
+                </page>
+                <page string="Payment Orders">
+                    <field name="payment_order_ids" colspan="4" nolabel="1">
+                        <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment Orders">
+                            <field name="reference"/>
+                            <field name="date_created"/>
+                            <field name="date_done"/>
+                            <field name="total"/>
+                            <field name="state"/>
+                        </tree>
+                    </field>
+                </page>
+            </notebook>
+        </form>
+    </field>
+</record>
+
+
+<record id="view_banking_export_sdd_tree" model="ir.ui.view">
+    <field name="name">account.banking.export.sdd.tree</field>
+    <field name="model">banking.export.sdd</field>
+    <field name="arch" type="xml">
+        <tree string="SEPA Direct Debit">
+            <field name="filename"/>
+            <field name="create_date"/>
+            <field name="nb_transactions"/>
+        </tree>
+    </field>
+</record>
+
+
+<record id="action_account_banking_sdd" model="ir.actions.act_window">
+    <field name="name">SEPA Direct Debit Files</field>
+    <field name="res_model">banking.export.sdd</field>
+    <field name="view_type">form</field>
+    <field name="view_mode">tree,form</field>
+</record>
+
+
+<menuitem id="menu_account_banking_sdd"
+          parent="account_payment.menu_main_payment"
+          action="action_account_banking_sdd"
+          sequence="20"
+          />
+
+<act_window id="act_banking_export_sdd_payment_order"
+    name="Generated SEPA Direct Debit Files"
+    domain="[('payment_order_ids', '=', active_id)]"
+    res_model="banking.export.sdd"
+    src_model="payment.order"
+    view_type="form"
+    view_mode="tree,form"
+/>
+
+</data>
+</openerp>

=== added file 'account_payment_sepa_direct_debit/account_invoice_view.xml'
--- account_payment_sepa_direct_debit/account_invoice_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/account_invoice_view.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2013 Akretion (http://www.akretion.com)
+  @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+<data>
+
+<record id="invoice_form" model="ir.ui.view">
+    <field name="name">add.sdd.mandate.on.customer.invoice.form</field>
+    <field name="model">account.invoice</field>
+    <field name="inherit_id" ref="account.invoice_form"/>
+    <field name="arch" type="xml">
+        <field name="partner_bank_id" position="after">
+            <field name="sdd_mandate_id" domain="[('partner_id', '=', partner_id), ('state', '=', 'valid')]" attrs="{'invisible': [('type', '=', 'out_refund')]}"/>
+        </field>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added file 'account_payment_sepa_direct_debit/account_payment_view.xml'
--- account_payment_sepa_direct_debit/account_payment_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/account_payment_view.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2013 Akretion (http://www.akretion.com)
+  @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+<data>
+
+<record id="sdd_view_payment_order_form" model="ir.ui.view">
+    <field name="name">sdd.payment.order.form</field>
+    <field name="model">payment.order</field>
+    <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
+    <field name="arch" type="xml">
+        <xpath expr="//field[@name='line_ids']/form/notebook/page/field[@name='bank_id']" position="after">
+            <field name="sdd_mandate_id" domain="[('partner_bank_id', '=', bank_id), ('state', '=', 'valid')]" invisible="context.get('default_type')!='receivable'" context="{'default_partner_bank_id': bank_id}"/>
+            <newline />
+        </xpath>
+        <xpath expr="//field[@name='line_ids']/tree/field[@name='bank_id']" position="after">
+            <field name="sdd_mandate_id" string="SDD Mandate" invisible="context.get('default_type')!='receivable'"/>
+        </xpath>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added file 'account_payment_sepa_direct_debit/company.py'
--- account_payment_sepa_direct_debit/company.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/company.py	2014-02-09 15:13:05 +0000
@@ -0,0 +1,89 @@
+##############################################################################
+#
+#    SEPA Direct Debit module for OpenERP
+#    Copyright (C) 2013 Akretion (http://www.akretion.com)
+#    @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+#
+#    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
+import logging
+
+logger = logging.getLogger(__name__)
+
+
+class res_company(orm.Model):
+    _inherit = 'res.company'
+
+    _columns = {
+        'sepa_creditor_identifier': fields.char(
+            'SEPA Creditor Identifier', size=35,
+            help="Enter the Creditor Identifier that has been attributed "
+            "to your company to make SEPA Direct Debits. This identifier "
+            "is composed of :\n- your country ISO code (2 letters)\n- a "
+            "2-digits checkum\n- a 3-letters business code\n- a "
+            "country-specific identifier"),
+        'original_creditor_identifier': fields.char(
+            'Original Creditor Identifier', size=70),
+    }
+
+    def is_sepa_creditor_identifier_valid(
+            self, cr, uid, sepa_creditor_identifier, context=None):
+        """Check if SEPA Creditor Identifier is valid
+        @param sepa_creditor_identifier: SEPA Creditor Identifier as str
+            or unicode
+        @return: True if valid, False otherwise
+        """
+        if not isinstance(sepa_creditor_identifier, (str, unicode)):
+            return False
+        try:
+            sci_str = str(sepa_creditor_identifier)
+        except:
+            logger.warning(
+                "SEPA Creditor ID should contain only ASCII caracters.")
+            return False
+        sci = sci_str.lower()
+        if len(sci) < 9:
+            return False
+        before_replacement = sci[7:] + sci[0:2] + '00'
+        logger.debug(
+            "SEPA ID check before_replacement = %s" % before_replacement)
+        after_replacement = ''
+        for char in before_replacement:
+            if char.isalpha():
+                after_replacement += str(ord(char)-87)
+            else:
+                after_replacement += char
+        logger.debug(
+            "SEPA ID check after_replacement = %s" % after_replacement)
+        if int(sci[2:4]) == (98 - (int(after_replacement) % 97)):
+            return True
+        else:
+            return False
+
+    def _check_sepa_creditor_identifier(self, cr, uid, ids):
+        for company in self.browse(cr, uid, ids):
+            if company.sepa_creditor_identifier:
+                if not self.is_sepa_creditor_identifier_valid(
+                        cr, uid, company.sepa_creditor_identifier):
+                    return False
+        return True
+
+    _constraints = [
+        (_check_sepa_creditor_identifier,
+            "Invalid SEPA Creditor Identifier.",
+            ['sepa_creditor_identifier']),
+    ]

=== added file 'account_payment_sepa_direct_debit/company_view.xml'
--- account_payment_sepa_direct_debit/company_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/company_view.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2013 Akretion (http://www.akretion.com)
+  @author: Alexis de Lattre <alexis.delattre@xxxxxxxxxxxx>
+  The licence is in the file __openerp__.py
+-->
+<openerp>
+<data>
+
+<record id="sdd_res_company_form" model="ir.ui.view">
+    <field name="name">sepa_direct_debit.res.company.form</field>
+    <field name="model">res.company</field>
+    <field name="inherit_id" ref="account_payment_pain_base.view_company_form"/>
+    <field name="arch" type="xml">
+        <field name="initiating_party_issuer" position="after">
+            <field name="sepa_creditor_identifier"/>
+            <field name="original_creditor_identifier" groups="account_banking_sepa_direct_debit.group_original_mandate_required"/>
+        </field>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added directory 'account_payment_sepa_direct_debit/data'
=== added file 'account_payment_sepa_direct_debit/data/mandate_reference_sequence.xml'
--- account_payment_sepa_direct_debit/data/mandate_reference_sequence.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/data/mandate_reference_sequence.xml	2014-02-09 15:13:05 +0000
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data noupdate="1">
+
+
+<record id="sdd_mandate_seq_type" model="ir.sequence.type">
+    <field name="name">SDD Mandate Reference</field>
+    <field name="code">sdd.mandate.reference</field>
+</record>
+
+<record id="sdd_mandate_seq" model="ir.sequence">
+    <field name="name">SDD Mandate Reference</field>
+    <field name="code">sdd.mandate.reference</field>
+    <field name="prefix">RUM</field>
+    <field name="padding" eval="7"/>
+    <!-- remember that max size for the mandate ref is 35 -->
+</record>
+
+
+</data>
+</openerp>

=== added file 'account_payment_sepa_direct_debit/data/pain.008.001.02.xsd'
--- account_payment_sepa_direct_debit/data/pain.008.001.02.xsd	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/data/pain.008.001.02.xsd	2014-02-09 15:13:05 +0000
@@ -0,0 +1,879 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--Generated by SWIFTStandards Workstation (build:R6.1.0.2) on 2009 Jan 08 17:30:53-->
+<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02" xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02">
+    <xs:element name="Document" type="Document"/>
+    <xs:complexType name="AccountIdentification4Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="IBAN" type="IBAN2007Identifier"/>
+                <xs:element name="Othr" type="GenericAccountIdentification1"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="AccountSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+        <xs:restriction base="xs:decimal">
+            <xs:minInclusive value="0"/>
+            <xs:fractionDigits value="5"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
+        <xs:simpleContent>
+            <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+                <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{3,3}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="AddressType2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="ADDR"/>
+            <xs:enumeration value="PBOX"/>
+            <xs:enumeration value="HOME"/>
+            <xs:enumeration value="BIZZ"/>
+            <xs:enumeration value="MLTO"/>
+            <xs:enumeration value="DLVY"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="AmendmentInformationDetails6">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlMndtId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrSchmeId" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgtAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtr" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgtAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFnlColltnDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFrqcy" type="Frequency1Code"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="AnyBICIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Authorisation1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="Authorisation1Code"/>
+                <xs:element name="Prtry" type="Max128Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Authorisation1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUTH"/>
+            <xs:enumeration value="FDET"/>
+            <xs:enumeration value="FSUM"/>
+            <xs:enumeration value="ILEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BICIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BatchBookingIndicator">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+    <xs:complexType name="BranchAndFinancialInstitutionIdentification4">
+        <xs:sequence>
+            <xs:element name="FinInstnId" type="FinancialInstitutionIdentification7"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="BranchData2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccount16">
+        <xs:sequence>
+            <xs:element name="Id" type="AccountIdentification4Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccountType2">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="CashAccountType4Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="CashAccountType4Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CASH"/>
+            <xs:enumeration value="CHAR"/>
+            <xs:enumeration value="COMM"/>
+            <xs:enumeration value="TAXE"/>
+            <xs:enumeration value="CISH"/>
+            <xs:enumeration value="TRAS"/>
+            <xs:enumeration value="SACC"/>
+            <xs:enumeration value="CACC"/>
+            <xs:enumeration value="SVGS"/>
+            <xs:enumeration value="ONDP"/>
+            <xs:enumeration value="MGLD"/>
+            <xs:enumeration value="NREX"/>
+            <xs:enumeration value="MOMA"/>
+            <xs:enumeration value="LOAN"/>
+            <xs:enumeration value="SLRY"/>
+            <xs:enumeration value="ODFT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="CategoryPurpose1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ChargeBearerType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="SHAR"/>
+            <xs:enumeration value="SLEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ClearingSystemIdentification2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ClearingSystemMemberIdentification2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
+            <xs:element name="MmbId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ContactDetails2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="CountryCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="CreditDebitCode">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRDT"/>
+            <xs:enumeration value="DBIT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="CreditorReferenceInformation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="DocumentType3Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CustomerDirectDebitInitiationV02">
+        <xs:sequence>
+            <xs:element name="GrpHdr" type="GroupHeader39"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstructionInformation4"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DateAndPlaceOfBirth">
+        <xs:sequence>
+            <xs:element name="BirthDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
+            <xs:element name="CityOfBirth" type="Max35Text"/>
+            <xs:element name="CtryOfBirth" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DatePeriodDetails">
+        <xs:sequence>
+            <xs:element name="FrDt" type="ISODate"/>
+            <xs:element name="ToDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DecimalNumber">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="17"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="DirectDebitTransaction6">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="MndtRltdInf" type="MandateRelatedInformation6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DirectDebitTransactionInformation9">
+        <xs:sequence>
+            <xs:element name="PmtId" type="PaymentIdentification1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation20"/>
+            <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DrctDbtTx" type="DirectDebitTransaction6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/>
+            <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount16"/>
+            <xs:element name="Dbtr" type="PartyIdentification32"/>
+            <xs:element name="DbtrAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrForCdtrAgt" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation5"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="Document">
+        <xs:sequence>
+            <xs:element name="CstmrDrctDbtInitn" type="CustomerDirectDebitInitiationV02"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DocumentAdjustment1">
+        <xs:sequence>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DocumentType3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="RADM"/>
+            <xs:enumeration value="RPIN"/>
+            <xs:enumeration value="FXDR"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="PUOR"/>
+            <xs:enumeration value="SCOR"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="DocumentType5Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MSIN"/>
+            <xs:enumeration value="CNFA"/>
+            <xs:enumeration value="DNFA"/>
+            <xs:enumeration value="CINV"/>
+            <xs:enumeration value="CREN"/>
+            <xs:enumeration value="DEBN"/>
+            <xs:enumeration value="HIRI"/>
+            <xs:enumeration value="SBIN"/>
+            <xs:enumeration value="CMCN"/>
+            <xs:enumeration value="SOAC"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="BOLD"/>
+            <xs:enumeration value="VCHR"/>
+            <xs:enumeration value="AROI"/>
+            <xs:enumeration value="TSUT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalAccountIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalCategoryPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalClearingSystemIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="5"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalLocalInstrument1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalOrganisationIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPersonIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalServiceLevel1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="FinancialIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="FinancialInstitutionIdentification7">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="BIC" type="BICIdentifier"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Frequency1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="YEAR"/>
+            <xs:enumeration value="MNTH"/>
+            <xs:enumeration value="QURT"/>
+            <xs:enumeration value="MIAN"/>
+            <xs:enumeration value="WEEK"/>
+            <xs:enumeration value="DAIL"/>
+            <xs:enumeration value="ADHO"/>
+            <xs:enumeration value="INDA"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="GenericAccountIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max34Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericFinancialIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericOrganisationIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericPersonIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GroupHeader39">
+        <xs:sequence>
+            <xs:element name="MsgId" type="Max35Text"/>
+            <xs:element name="CreDtTm" type="ISODateTime"/>
+            <xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
+            <xs:element name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element name="InitgPty" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="IBAN2007Identifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ISODate">
+        <xs:restriction base="xs:date"/>
+    </xs:simpleType>
+    <xs:simpleType name="ISODateTime">
+        <xs:restriction base="xs:dateTime"/>
+    </xs:simpleType>
+    <xs:complexType name="LocalInstrument2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="MandateRelatedInformation6">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="MndtId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DtOfSgntr" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AmdmntInd" type="TrueFalseIndicator"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AmdmntInfDtls" type="AmendmentInformationDetails6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ElctrncSgntr" type="Max1025Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrstColltnDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FnlColltnDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Frqcy" type="Frequency1Code"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Max1025Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="1025"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max10Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="10"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max128Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="128"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max140Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="140"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max15NumericText">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[0-9]{1,15}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max16Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="16"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max2048Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="2048"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max34Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="34"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max35Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max4Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max70Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="70"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="NameAndAddress10">
+        <xs:sequence>
+            <xs:element name="Nm" type="Max140Text"/>
+            <xs:element name="Adr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="NamePrefix1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DOCT"/>
+            <xs:enumeration value="MIST"/>
+            <xs:enumeration value="MISS"/>
+            <xs:enumeration value="MADM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Number">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="0"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="OrganisationIdentification4">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="BICOrBEI" type="AnyBICIdentifier"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="OrganisationIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="Party6Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="OrgId" type="OrganisationIdentification4"/>
+                <xs:element name="PrvtId" type="PersonIdentification5"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PartyIdentification32">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party6Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentIdentification1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
+            <xs:element name="EndToEndId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentInstructionInformation4">
+        <xs:sequence>
+            <xs:element name="PmtInfId" type="Max35Text"/>
+            <xs:element name="PmtMtd" type="PaymentMethod2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation20"/>
+            <xs:element name="ReqdColltnDt" type="ISODate"/>
+            <xs:element name="Cdtr" type="PartyIdentification32"/>
+            <xs:element name="CdtrAcct" type="CashAccount16"/>
+            <xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount16"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification4"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification32"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="DrctDbtTxInf" type="DirectDebitTransactionInformation9"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PaymentMethod2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DD"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PaymentTypeInformation20">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SeqTp" type="SequenceType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PercentageRate">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="10"/>
+            <xs:totalDigits value="11"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PersonIdentification5">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PersonIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PhoneNumber">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PostalAddress6">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Priority2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="HIGH"/>
+            <xs:enumeration value="NORM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Purpose2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalPurpose1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="DocumentType5Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryAuthority2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RegulatoryReportingType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="BOTH"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="RemittanceAmount1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DscntApldAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceInformation5">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation7"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceLocation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RemittanceLocationMethod2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="FAXI"/>
+            <xs:enumeration value="EDIC"/>
+            <xs:enumeration value="URID"/>
+            <xs:enumeration value="EMAL"/>
+            <xs:enumeration value="POST"/>
+            <xs:enumeration value="SMSM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="SequenceType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="FRST"/>
+            <xs:enumeration value="RCUR"/>
+            <xs:enumeration value="FNAL"/>
+            <xs:enumeration value="OOFF"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ServiceLevel8Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalServiceLevel1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="StructuredRegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="StructuredRemittanceInformation7">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification32"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification32"/>
+            <xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmount1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAuthorisation1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxPeriod1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecord1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecordDetails1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="TaxRecordPeriod1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MM01"/>
+            <xs:enumeration value="MM02"/>
+            <xs:enumeration value="MM03"/>
+            <xs:enumeration value="MM04"/>
+            <xs:enumeration value="MM05"/>
+            <xs:enumeration value="MM06"/>
+            <xs:enumeration value="MM07"/>
+            <xs:enumeration value="MM08"/>
+            <xs:enumeration value="MM09"/>
+            <xs:enumeration value="MM10"/>
+            <xs:enumeration value="MM11"/>
+            <xs:enumeration value="MM12"/>
+            <xs:enumeration value="QTR1"/>
+            <xs:enumeration value="QTR2"/>
+            <xs:enumeration value="QTR3"/>
+            <xs:enumeration value="QTR4"/>
+            <xs:enumeration value="HLF1"/>
+            <xs:enumeration value="HLF2"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="TrueFalseIndicator">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+</xs:schema>

=== added file 'account_payment_sepa_direct_debit/data/pain.008.001.03.xsd'
--- account_payment_sepa_direct_debit/data/pain.008.001.03.xsd	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/data/pain.008.001.03.xsd	2014-02-09 15:13:05 +0000
@@ -0,0 +1,925 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Generated by SWIFTStandards Workstation (build:R7.1.30.4) on 2012 Jun 07 20:47:19-->
+<xs:schema elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.008.001.03" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.03" xmlns:xs="http://www.w3.org/2001/XMLSchema";>
+    <xs:element name="Document" type="Document"/>
+    <xs:complexType name="AccountIdentification4Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="IBAN" type="IBAN2007Identifier"/>
+                <xs:element name="Othr" type="GenericAccountIdentification1"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="AccountSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="5"/>
+            <xs:totalDigits value="18"/>
+            <xs:minInclusive value="0"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
+        <xs:simpleContent>
+            <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
+                <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+    <xs:simpleType name="ActiveOrHistoricCurrencyCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{3,3}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="AddressType2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="ADDR"/>
+            <xs:enumeration value="PBOX"/>
+            <xs:enumeration value="HOME"/>
+            <xs:enumeration value="BIZZ"/>
+            <xs:enumeration value="MLTO"/>
+            <xs:enumeration value="DLVY"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="AmendmentInformationDetails8">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlMndtId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrSchmeId" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgtAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgtAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFnlColltnDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFrqcy" type="Frequency6Code"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="AnyBICIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Authorisation1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="Authorisation1Code"/>
+                <xs:element name="Prtry" type="Max128Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Authorisation1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUTH"/>
+            <xs:enumeration value="FDET"/>
+            <xs:enumeration value="FSUM"/>
+            <xs:enumeration value="ILEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BICFIIdentifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="BatchBookingIndicator">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+    <xs:complexType name="BranchAndFinancialInstitutionIdentification5">
+        <xs:sequence>
+            <xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="BranchData2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccount24">
+        <xs:sequence>
+            <xs:element name="Id" type="AccountIdentification4Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CashAccountType2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalCashAccountType1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CategoryPurpose1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="ChargeBearerType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="SHAR"/>
+            <xs:enumeration value="SLEV"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ClearingSystemIdentification2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ClearingSystemMemberIdentification2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
+            <xs:element name="MmbId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ContactDetails2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="CountryCode">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="CreditDebitCode">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRDT"/>
+            <xs:enumeration value="DBIT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="CreditorReferenceInformation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="DocumentType3Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CreditorReferenceType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="CustomerDirectDebitInitiationV03">
+        <xs:sequence>
+            <xs:element name="GrpHdr" type="GroupHeader55"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstruction7"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DateAndPlaceOfBirth">
+        <xs:sequence>
+            <xs:element name="BirthDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
+            <xs:element name="CityOfBirth" type="Max35Text"/>
+            <xs:element name="CtryOfBirth" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DatePeriodDetails">
+        <xs:sequence>
+            <xs:element name="FrDt" type="ISODate"/>
+            <xs:element name="ToDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DecimalNumber">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="17"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="DirectDebitTransaction7">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="MndtRltdInf" type="MandateRelatedInformation8"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DirectDebitTransactionInformation11">
+        <xs:sequence>
+            <xs:element name="PmtId" type="PaymentIdentification1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation24"/>
+            <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DrctDbtTx" type="DirectDebitTransaction7"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
+            <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
+            <xs:element name="Dbtr" type="PartyIdentification43"/>
+            <xs:element name="DbtrAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrForCdtrAgt" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
+            <xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation7"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DiscountAmountAndType1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DiscountAmountType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalDiscountAmountType1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="Document">
+        <xs:sequence>
+            <xs:element name="CstmrDrctDbtInitn" type="CustomerDirectDebitInitiationV03"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="DocumentAdjustment1">
+        <xs:sequence>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="DocumentType3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="RADM"/>
+            <xs:enumeration value="RPIN"/>
+            <xs:enumeration value="FXDR"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="PUOR"/>
+            <xs:enumeration value="SCOR"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="DocumentType5Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MSIN"/>
+            <xs:enumeration value="CNFA"/>
+            <xs:enumeration value="DNFA"/>
+            <xs:enumeration value="CINV"/>
+            <xs:enumeration value="CREN"/>
+            <xs:enumeration value="DEBN"/>
+            <xs:enumeration value="HIRI"/>
+            <xs:enumeration value="SBIN"/>
+            <xs:enumeration value="CMCN"/>
+            <xs:enumeration value="SOAC"/>
+            <xs:enumeration value="DISP"/>
+            <xs:enumeration value="BOLD"/>
+            <xs:enumeration value="VCHR"/>
+            <xs:enumeration value="AROI"/>
+            <xs:enumeration value="TSUT"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalAccountIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalCashAccountType1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalCategoryPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalClearingSystemIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="5"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalDiscountAmountType1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalLocalInstrument1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalOrganisationIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPersonIdentification1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalPurpose1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalServiceLevel1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ExternalTaxAmountType1Code">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="FinancialIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="FinancialInstitutionIdentification8">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Frequency6Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="YEAR"/>
+            <xs:enumeration value="MNTH"/>
+            <xs:enumeration value="QURT"/>
+            <xs:enumeration value="MIAN"/>
+            <xs:enumeration value="WEEK"/>
+            <xs:enumeration value="DAIL"/>
+            <xs:enumeration value="ADHO"/>
+            <xs:enumeration value="INDA"/>
+            <xs:enumeration value="FRTN"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="GenericAccountIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max34Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericFinancialIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericOrganisationIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GenericPersonIdentification1">
+        <xs:sequence>
+            <xs:element name="Id" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="GroupHeader55">
+        <xs:sequence>
+            <xs:element name="MsgId" type="Max35Text"/>
+            <xs:element name="CreDtTm" type="ISODateTime"/>
+            <xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
+            <xs:element name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element name="InitgPty" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="IBAN2007Identifier">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="ISODate">
+        <xs:restriction base="xs:date"/>
+    </xs:simpleType>
+    <xs:simpleType name="ISODateTime">
+        <xs:restriction base="xs:dateTime"/>
+    </xs:simpleType>
+    <xs:complexType name="LocalInstrument2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="MandateRelatedInformation8">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="MndtId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DtOfSgntr" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AmdmntInd" type="TrueFalseIndicator"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AmdmntInfDtls" type="AmendmentInformationDetails8"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ElctrncSgntr" type="Max1025Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrstColltnDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FnlColltnDt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Frqcy" type="Frequency6Code"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Max1025Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="1025"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max10Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="10"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max128Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="128"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max140Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="140"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max15NumericText">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[0-9]{1,15}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max16Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="16"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max2048Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="2048"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max34Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="34"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max350Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="350"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max35Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="35"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max4Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="4"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Max70Text">
+        <xs:restriction base="xs:string">
+            <xs:minLength value="1"/>
+            <xs:maxLength value="70"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="NameAndAddress10">
+        <xs:sequence>
+            <xs:element name="Nm" type="Max140Text"/>
+            <xs:element name="Adr" type="PostalAddress6"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="NamePrefix1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DOCT"/>
+            <xs:enumeration value="MIST"/>
+            <xs:enumeration value="MISS"/>
+            <xs:enumeration value="MADM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="Number">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="0"/>
+            <xs:totalDigits value="18"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="OrganisationIdentification8">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="OrganisationIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="Party11Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="OrgId" type="OrganisationIdentification8"/>
+                <xs:element name="PrvtId" type="PersonIdentification5"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PartyIdentification43">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentIdentification1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
+            <xs:element name="EndToEndId" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PaymentInstruction7">
+        <xs:sequence>
+            <xs:element name="PmtInfId" type="Max35Text"/>
+            <xs:element name="PmtMtd" type="PaymentMethod2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation24"/>
+            <xs:element name="ReqdColltnDt" type="ISODate"/>
+            <xs:element name="Cdtr" type="PartyIdentification43"/>
+            <xs:element name="CdtrAcct" type="CashAccount24"/>
+            <xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount24"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification5"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification43"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="DrctDbtTxInf" type="DirectDebitTransactionInformation11"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PaymentMethod2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="DD"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PaymentTypeInformation24">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SeqTp" type="SequenceType3Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PercentageRate">
+        <xs:restriction base="xs:decimal">
+            <xs:fractionDigits value="10"/>
+            <xs:totalDigits value="11"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PersonIdentification5">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="PersonIdentificationSchemeName1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="PhoneNumber">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="PostalAddress6">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="Priority2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="HIGH"/>
+            <xs:enumeration value="NORM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="Purpose2Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalPurpose1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="DocumentType5Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ReferredDocumentType2">
+        <xs:sequence>
+            <xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryAuthority2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RegulatoryReportingType1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="CRED"/>
+            <xs:enumeration value="DEBT"/>
+            <xs:enumeration value="BOTH"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="RemittanceAmount2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceInformation7">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation9"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="RemittanceLocation2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="RemittanceLocationMethod2Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="FAXI"/>
+            <xs:enumeration value="EDIC"/>
+            <xs:enumeration value="URID"/>
+            <xs:enumeration value="EMAL"/>
+            <xs:enumeration value="POST"/>
+            <xs:enumeration value="SMSM"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="SequenceType3Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="FRST"/>
+            <xs:enumeration value="RCUR"/>
+            <xs:enumeration value="FNAL"/>
+            <xs:enumeration value="OOFF"/>
+            <xs:enumeration value="RPRE"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ServiceLevel8Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalServiceLevel1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="StructuredRegulatoryReporting3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="StructuredRemittanceInformation9">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/>
+            <xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="SupplementaryData1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/>
+            <xs:element name="Envlp" type="SupplementaryDataEnvelope1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="SupplementaryDataEnvelope1">
+        <xs:sequence>
+            <xs:any namespace="##any" processContents="lax"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmount1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmountAndType1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAmountType1Choice">
+        <xs:sequence>
+            <xs:choice>
+                <xs:element name="Cd" type="ExternalTaxAmountType1Code"/>
+                <xs:element name="Prtry" type="Max35Text"/>
+            </xs:choice>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxAuthorisation1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxInformation3">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxParty2">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxPeriod1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecord1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
+            <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="TaxRecordDetails1">
+        <xs:sequence>
+            <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
+            <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:simpleType name="TaxRecordPeriod1Code">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="MM01"/>
+            <xs:enumeration value="MM02"/>
+            <xs:enumeration value="MM03"/>
+            <xs:enumeration value="MM04"/>
+            <xs:enumeration value="MM05"/>
+            <xs:enumeration value="MM06"/>
+            <xs:enumeration value="MM07"/>
+            <xs:enumeration value="MM08"/>
+            <xs:enumeration value="MM09"/>
+            <xs:enumeration value="MM10"/>
+            <xs:enumeration value="MM11"/>
+            <xs:enumeration value="MM12"/>
+            <xs:enumeration value="QTR1"/>
+            <xs:enumeration value="QTR2"/>
+            <xs:enumeration value="QTR3"/>
+            <xs:enumeration value="QTR4"/>
+            <xs:enumeration value="HLF1"/>
+            <xs:enumeration value="HLF2"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="TrueFalseIndicator">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+</xs:schema>
\ No newline at end of file

=== added file 'account_payment_sepa_direct_debit/data/pain.008.001.04.xsd'
--- account_payment_sepa_direct_debit/data/pain.008.001.04.xsd	1970-01-01 00:00:00 +0000
+++ account_payment_sepa_direct_debit/data/pain.008.001.04.xsd	2014-02-09 15:13:05 +0000
@@ -0,0 +1,892 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Generated by Standards Editor (build:R1.0.41.3) on 2013 Mar 05 13:39:40, ISO 20022 version : 2013-->
+<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.04" xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.008.001.04">
+    <xs:element name="Document" type="Document"/>
+    <xs:complexType name="AccountIdentification4Choice">
+        <xs:choice>
+            <xs:element name="IBAN" type="IBAN2007Identifier"/>
+            <xs:element name="Othr" type="GenericAccountIdentification1"/>
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="AccountSchemeName1Choice">
+        <xs:choice>
+            <xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </xs

Follow ups