← Back to team overview

banking-addons-team team mailing list archive

[Merge] lp:~akretion-team/banking-addons/70-sepa-direct-debit into lp:banking-addons

 

Alexis de Lattre has proposed merging lp:~akretion-team/banking-addons/70-sepa-direct-debit into lp:banking-addons.

Requested reviews:
  Banking Addons Core Editors (banking-addons-team)

For more details, see:
https://code.launchpad.net/~akretion-team/banking-addons/70-sepa-direct-debit/+merge/195139

February 1st 2014 is approaching, so OpenERP needs to be SEPA-ready not just on Credit Transfers but also on Direct Debits ! Here comes the module "account_banking_sepa_direct_debit" !

I have already successfully made a direct debit with a French bank using an XML file generated by this module.
-- 
https://code.launchpad.net/~akretion-team/banking-addons/70-sepa-direct-debit/+merge/195139
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~akretion-team/banking-addons/70-sepa-direct-debit into lp:banking-addons.
=== modified file 'account_banking_payment/__openerp__.py'
--- account_banking_payment/__openerp__.py	2013-08-13 09:18:15 +0000
+++ account_banking_payment/__openerp__.py	2013-11-13 21:07:27 +0000
@@ -39,6 +39,7 @@
         'view/banking_transaction_wizard.xml',
         'view/payment_mode.xml',
         'view/payment_mode_type.xml',
+        'view/payment_order_create_view.xml',
         'workflow/account_payment.xml',
     ],
     'description': '''

=== modified file 'account_banking_payment/model/__init__.py'
--- account_banking_payment/model/__init__.py	2013-08-13 09:18:15 +0000
+++ account_banking_payment/model/__init__.py	2013-11-13 21:07:27 +0000
@@ -1,7 +1,7 @@
 import account_payment
 import payment_line
+import payment_mode_type
 import payment_mode
-import payment_mode_type
 import payment_order_create
 import banking_import_transaction
 import banking_transaction_wizard

=== modified file 'account_banking_payment/model/account_payment.py'
--- account_banking_payment/model/account_payment.py	2013-10-14 11:18:42 +0000
+++ account_banking_payment/model/account_payment.py	2013-11-13 21:07:27 +0000
@@ -107,6 +107,7 @@
         'payment_order_type': fields.selection(
             [('payment', 'Payment'),('debit', 'Direct debit')],
             'Payment order type', required=True,
+            readonly=True, states={'draft': [('readonly', False)]},
             ),
         'date_sent': fields.date('Send date', readonly=True),
     }

=== modified file 'account_banking_payment/model/payment_mode.py'
--- account_banking_payment/model/payment_mode.py	2013-08-13 09:18:15 +0000
+++ account_banking_payment/model/payment_mode.py	2013-11-13 21:07:27 +0000
@@ -50,4 +50,8 @@
             help=('Limit selected invoices to invoices with these payment '
                   'terms')
             ),
+        'payment_order_type': fields.related(
+            'type', 'payment_order_type', readonly=True, type='selection',
+            selection=[('payment', 'Payment'), ('debit', 'Direct debit')],
+            string="Payment Order Type"),
         }

=== modified file 'account_banking_payment/view/payment_mode.xml'
--- account_banking_payment/view/payment_mode.xml	2013-08-13 09:18:15 +0000
+++ account_banking_payment/view/payment_mode.xml	2013-11-13 21:07:27 +0000
@@ -11,6 +11,7 @@
             <field name="inherit_id" ref="account_banking_payment_export.view_payment_mode_form_inherit"/>
             <field name="arch" type="xml">
                 <field name="type" position="after">
+                    <field name="payment_order_type"/>
                     <group colspan="4" col="4">
                         <group colspan="2">
                             <separator colspan="2"

=== added file 'account_banking_payment/view/payment_order_create_view.xml'
--- account_banking_payment/view/payment_order_create_view.xml	1970-01-01 00:00:00 +0000
+++ account_banking_payment/view/payment_order_create_view.xml	2013-11-13 21:07:27 +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="view_create_payment_order_lines" model="ir.ui.view">
+    <field name="name">add.context.to.display.maturity.date</field>
+    <field name="model">payment.order.create</field>
+    <field name="inherit_id" ref="account_payment.view_create_payment_order_lines"/>
+    <field name="arch" type="xml">
+        <field name="entries" position="attributes">
+            <attribute name="context">{'journal_type': 'sale'}</attribute>
+            <attribute name="nolabel">1</attribute>
+        </field>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added directory 'account_banking_sepa_direct_debit'
=== added file 'account_banking_sepa_direct_debit/__init__.py'
--- account_banking_sepa_direct_debit/__init__.py	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/__init__.py	2013-11-13 21:07:27 +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_banking_sepa_direct_debit/__openerp__.py'
--- account_banking_sepa_direct_debit/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/__openerp__.py	2013-11-13 21:07:27 +0000
@@ -0,0 +1,59 @@
+##############################################################################
+#
+#    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/>.
+#
+##############################################################################
+{
+    'name': 'Account Banking 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_direct_debit'],
+    'external_dependencies': {
+        'python': ['unidecode', 'lxml'],
+        },
+    'data': [
+        '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.
+    ''',
+    'active': False,
+    'installable': True,
+}

=== added file 'account_banking_sepa_direct_debit/account_banking_sdd.py'
--- account_banking_sepa_direct_debit/account_banking_sdd.py	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/account_banking_sdd.py	2013-11-13 21:07:27 +0000
@@ -0,0 +1,362 @@
+##############################################################################
+#
+#    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),
+        'requested_collec_date': fields.date(
+            'Requested Collection Date', 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'),
+        '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),
+        'type': fields.selection([
+            ('recurrent', 'Recurrent'),
+            ('oneoff', 'One-Off'),
+            ], 'Type of Mandate', required=True),
+        'recurrent_sequence_type': fields.selection([
+            ('first', 'First'),
+            ('recurring', 'Recurring'),
+            ('final', 'Final'),
+            ], 'Sequence Type for Next Debit',
+            help="This field is only used for Recurrent mandates, not for One-Off mandates."),
+        'signature_date': fields.date('Date of Signature of the Mandate'),
+        '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"),
+        }
+
+    _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',
+    }
+
+    _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, context=None):
+        for mandate in self.read(cr, uid, ids, [
+                'last_debit_date', 'signature_date',
+                'unique_mandate_reference', 'state', 'partner_bank_id',
+                'type', 'recurrent_sequence_type',
+                ], context=context):
+            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'])
+        return True
+
+    _constraints = [
+        (_check_sdd_mandate, "Error msg in raise", [
+            'last_debit_date', 'signature_date', 'state', 'partner_bank_id',
+            'type', 'recurrent_sequence_type',
+            ]),
+    ]
+
+    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):
+        if (state == 'valid' and partner_bank_id
+                and type == 'recurrent'
+                and recurrent_sequence_type != 'first'):
+            return {
+                'value': {'recurrent_sequence_type': 'first'},
+                'warning': {
+                    'title': _('Mandate update'),
+                    'message': _("As you changed the bank account attached to this mandate, the 'Sequence Type' has been set back to 'First'."),
+                    }
+                }
+        else:
+            return True
+
+    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('default_payment_order_type') == 'debit'
+                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_banking_sepa_direct_debit/account_banking_sdd_view.xml'
--- account_banking_sepa_direct_debit/account_banking_sdd_view.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/account_banking_sdd_view.xml	2013-11-13 21:07:27 +0000
@@ -0,0 +1,82 @@
+<?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="requested_collec_date" />
+                    <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="requested_collec_date"/>
+            <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">Generated 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_banking_sepa_direct_debit/account_invoice_view.xml'
--- account_banking_sepa_direct_debit/account_invoice_view.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/account_invoice_view.xml	2013-11-13 21:07:27 +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_banking_sepa_direct_debit/account_payment_view.xml'
--- account_banking_sepa_direct_debit/account_payment_view.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/account_payment_view.xml	2013-11-13 21:07:27 +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/group/field[@name='bank_id']" position="after">
+            <field name="sdd_mandate_id" domain="[('partner_bank_id', '=', bank_id), ('state', '=', 'valid')]" invisible="context.get('default_payment_order_type')!='debit'" 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_payment_order_type')!='debit'"/>
+        </xpath>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added file 'account_banking_sepa_direct_debit/company.py'
--- account_banking_sepa_direct_debit/company.py	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/company.py	2013-11-13 21:07:27 +0000
@@ -0,0 +1,83 @@
+##############################################################################
+#
+#    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"),
+    }
+
+    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_banking_sepa_direct_debit/company_view.xml'
--- account_banking_sepa_direct_debit/company_view.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/company_view.xml	2013-11-13 21:07:27 +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="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="base.view_company_form"/>
+    <field name="arch" type="xml">
+        <field name="currency_id" position="after">
+            <field name="sepa_creditor_identifier"/>
+        </field>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added directory 'account_banking_sepa_direct_debit/data'
=== added file 'account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml'
--- account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml	2013-11-13 21:07:27 +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_banking_sepa_direct_debit/data/pain.008.001.02.xsd'
--- account_banking_sepa_direct_debit/data/pain.008.001.02.xsd	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/data/pain.008.001.02.xsd	2013-11-13 21:07:27 +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_banking_sepa_direct_debit/data/pain.008.001.03.xsd'
--- account_banking_sepa_direct_debit/data/pain.008.001.03.xsd	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/data/pain.008.001.03.xsd	2013-11-13 21:07:27 +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_banking_sepa_direct_debit/data/pain.008.001.04.xsd'
--- account_banking_sepa_direct_debit/data/pain.008.001.04.xsd	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/data/pain.008.001.04.xsd	2013-11-13 21:07:27 +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: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: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="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="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="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="CustomerDirectDebitInitiationV04">
+        <xs:sequence>
+            <xs:element name="GrpHdr" type="GroupHeader55"/>
+            <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstruction10"/>
+            <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="DirectDebitTransactionInformation13">
+        <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:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
+        </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: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="CstmrDrctDbtInitn" type="CustomerDirectDebitInitiationV04"/>
+        </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: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: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:choice>
+            <xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
+            <xs:element name="Prtry" type="Max35Text"/>
+        </xs:choice>
+    </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: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="PaymentInstruction10">
+        <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="DirectDebitTransactionInformation13"/>
+        </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: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: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: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:simpleType name="TrueFalseIndicator">
+        <xs:restriction base="xs:boolean"/>
+    </xs:simpleType>
+</xs:schema>

=== added file 'account_banking_sepa_direct_debit/data/payment_type_sdd.xml'
--- account_banking_sepa_direct_debit/data/payment_type_sdd.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/data/payment_type_sdd.xml	2013-11-13 21:07:27 +0000
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data noupdate="0"> <!--  TODO : put to 1 when dev of the module is finished -->
+
+
+<!-- TODO In the suitable_bank_types field, we should add l10n_fr_rib via a small stupid module -->
+<record id="export_sdd_008_001_02" model="payment.mode.type">
+    <field name="name">SEPA Direct Debit v02 (recommended)</field>
+    <field name="code">pain.008.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_sdd_wizard"/>
+    <field name="payment_order_type">debit</field>
+</record>
+
+<record id="export_sdd_008_001_03" model="payment.mode.type">
+    <field name="name">SEPA Direct Debit v03</field>
+    <field name="code">pain.008.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_sdd_wizard"/>
+    <field name="payment_order_type">debit</field>
+</record>
+
+<record id="export_sdd_008_001_04" model="payment.mode.type">
+    <field name="name">SEPA Direct Debit v04</field>
+    <field name="code">pain.008.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_sdd_wizard"/>
+    <field name="payment_order_type">debit</field>
+</record>
+
+
+
+</data>
+</openerp>

=== added directory 'account_banking_sepa_direct_debit/i18n'
=== added file 'account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot'
--- account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot	2013-11-13 21:07:27 +0000
@@ -0,0 +1,643 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_banking_sepa_direct_debit
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-11 14:28+0000\n"
+"PO-Revision-Date: 2013-11-11 14: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_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.mandate_valid
+msgid "SEPA Direct Debit Mandate Validated"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,filename:0
+#: field:banking.export.sdd.wizard,filename:0
+msgid "Filename"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,requested_collec_date:0
+#: field:banking.export.sdd.wizard,requested_collec_date:0
+msgid "Requested Collection Date"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:276
+#, python-format
+msgid "The SEPA Direct Debit mandate with reference '%s' for partner '%s' has expired."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:186
+#, python-format
+msgid "Cannot validate the mandate '%s' without a date of signature."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:sdd.mandate,recurrent_sequence_type:0
+msgid "Final"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd.wizard,state:0
+msgid "Finish"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:res.partner:0
+#: view:res.partner.bank:0
+msgid "SDD Mandates"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: constraint:payment.line:0
+#: constraint:sdd.mandate:0
+msgid "Error msg in raise"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,recurrent_sequence_type:0
+msgid "Sequence Type for Next Debit"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,charge_bearer:0
+#: selection:banking.export.sdd.wizard,charge_bearer:0
+msgid "Borne by Creditor"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.sdd_mandate_action
+#: model:ir.ui.menu,name:account_banking_sepa_direct_debit.sdd_mandate_menu
+#: view:res.partner.bank:0
+#: field:res.partner.bank,sdd_mandate_ids:0
+msgid "SEPA Direct Debit Mandates"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd.wizard:0
+#: view:sdd.mandate:0
+msgid "Validate"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring
+msgid "Sequence Type set to Recurring"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd.wizard:0
+msgid "Generate"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.mandate_cancel
+msgid "SEPA Direct Debit Mandate Cancelled"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,charge_bearer:0
+#: selection:banking.export.sdd.wizard,charge_bearer:0
+msgid "Borne by Debtor"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:180
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:185
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:190
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:197
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:203
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:336
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:89
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:115
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:121
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:130
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:168
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:219
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:269
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:275
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:287
+#, python-format
+msgid "Error:"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_ids:0
+msgid "Messages"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:131
+#, python-format
+msgid "The '%s' is empty or 0. It should have a non-null value."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:89
+#, python-format
+msgid "This IBAN is not valid : %s"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd_wizard
+msgid "Export SEPA Direct Debit XML file"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:219
+#, python-format
+msgid "Payment Type Code '%s' is not supported. The only Payment Type Code supported for SEPA Direct Debit are 'pain.008.001.02', 'pain.008.001.03' and 'pain.008.001.04'."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,message_unread:0
+msgid "If checked new messages require your attention."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd.wizard,file_id:0
+msgid "SDD File"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.mandate_expired
+msgid "SEPA Direct Debit Mandate has Expired"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: help:banking.export.sdd,charge_bearer:0
+#: help:banking.export.sdd.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 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_direct_debit
+#: view:sdd.mandate:0
+msgid "Reference"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd:0
+msgid "SEPA Direct Debit"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd.wizard:0
+msgid "SEPA Direct Debit XML file generation"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,message_summary:0
+msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: help:banking.export.sdd.wizard,requested_collec_date:0
+msgid "This is the date on which you would like the collection to be made by the bank. Please keep in mind that there are minimum delays for SEPA direct debits that depend on the type of mandate and the type of sequence."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_payment_line
+msgid "Payment Line"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,create_date:0
+msgid "Generation Date"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:337
+#, python-format
+msgid "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')."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd.wizard,state:0
+msgid "Create"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,nb_transactions:0
+#: field:banking.export.sdd.wizard,nb_transactions:0
+msgid "Number of Transactions"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,type:0
+msgid "One-Off"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,state:0
+#: field:banking.export.sdd.wizard,state:0
+msgid "State"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:204
+#, python-format
+msgid "The recurrent mandate '%s' must have a sequence type."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_follower_ids:0
+msgid "Followers"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_unread:0
+msgid "Unread Messages"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd:0
+#: field:banking.export.sdd,payment_order_ids:0
+#: field:banking.export.sdd.wizard,payment_order_ids:0
+msgid "Payment Orders"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+msgid "Type"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,state:0
+msgid "Sent"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:sdd.mandate,recurrent_sequence_type:0
+msgid "Recurring"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:181
+#, python-format
+msgid "The date of signature of mandate '%s' is in the future!"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: help:res.company,sepa_creditor_identifier:0
+msgid "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"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: sql_constraint:sdd.mandate:0
+msgid "A Mandate with the same reference already exists for this company !"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,state:0
+msgid "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."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,recurrent_sequence_type:0
+msgid "This field is only used for Recurrent mandates, not for One-Off mandates."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+msgid "Signature Date"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,charge_bearer:0
+#: field:banking.export.sdd.wizard,charge_bearer:0
+msgid "Charge Bearer"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,partner_id:0
+msgid "Partner"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:125
+#, python-format
+msgid "Field type error:"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:sdd.mandate,recurrent_sequence_type:0
+msgid "First"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,signature_date:0
+msgid "Date of Signature of the Mandate"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.mandate_cancel
+msgid "Mandate Cancelled"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.act_banking_export_sdd_payment_order
+#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.action_account_banking_sdd
+#: model:ir.ui.menu,name:account_banking_sepa_direct_debit.menu_account_banking_sdd
+msgid "Generated SEPA Direct Debit Files"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,state:0
+msgid "Reconciled"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:191
+#, python-format
+msgid "Cannot validate the mandate '%s' because it is not attached to a bank account."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,state:0
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:232
+#, python-format
+msgid "Mandate update"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:116
+#, python-format
+msgid "Cannot compute the '%s' of the Payment Line with Invoice Reference '%s'."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,charge_bearer:0
+#: selection:banking.export.sdd.wizard,charge_bearer:0
+msgid "Shared"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,batch_booking:0
+#: field:banking.export.sdd.wizard,batch_booking:0
+msgid "Batch Booking"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,state:0
+msgid "Status"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,total_amount:0
+#: field:banking.export.sdd.wizard,total_amount:0
+msgid "Total Amount"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: help:banking.export.sdd,batch_booking:0
+#: help:banking.export.sdd.wizard,batch_booking:0
+msgid "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."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,charge_bearer:0
+#: selection:banking.export.sdd.wizard,charge_bearer:0
+msgid "Following Service Level"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:198
+#, python-format
+msgid "The mandate '%s' can't have a date of last debit before the date of signature."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_final
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_final
+msgid "Sequence Type set to Final"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_is_follower:0
+msgid "Is a Follower"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:payment.order:0
+msgid "SDD Mandate"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_summary:0
+msgid "Summary"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:account.invoice,sdd_mandate_id:0
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_sdd_mandate
+#: field:payment.line,sdd_mandate_id:0
+#: view:sdd.mandate:0
+msgid "SEPA Direct Debit Mandate"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:270
+#, python-format
+msgid "Missing SEPA Direct Debit mandate on the payment line with partner '%s' and Invoice ref '%s'."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:288
+#, python-format
+msgid "The mandate with reference '%s' for partner '%s' has type set to 'One-Off' and it has a last debit date set to '%s', so we can't use it."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,scan:0
+msgid "Scan of the Mandate"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,last_debit_date:0
+msgid "Date of the Last Debit"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.mandate_expired
+msgid "Mandate Expired"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: constraint:res.company:0
+msgid "Invalid SEPA Creditor Identifier."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_res_partner_bank
+msgid "Bank Accounts"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.actions.act_window,help:account_banking_sepa_direct_debit.sdd_mandate_action
+msgid "<p class=\"oe_view_nocontent_create\">\n"
+"        Click to create a new SEPA Direct Debit Mandate.\n"
+"        </p><p>\n"
+"        A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account.\n"
+"        </p>\n"
+"    "
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd:0
+msgid "General Information"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,state:0
+msgid "Valid"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_account_invoice
+msgid "Invoice"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd.wizard:0
+#: view:sdd.mandate:0
+msgid "Cancel"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: field:sdd.mandate,payment_line_ids:0
+msgid "Related Payment Lines"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.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 ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,type:0
+msgid "Recurrent"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,type:0
+msgid "Type of Mandate"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.mandate_valid
+msgid "Mandate Validated"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,file:0
+msgid "SEPA File"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:res.company,sepa_creditor_identifier:0
+msgid "SEPA Creditor Identifier"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:122
+#, python-format
+msgid "Cannot compute the '%s'."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:126
+#, python-format
+msgid "The type of the field '%s' is %s. It should be a string or unicode."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd
+msgid "SEPA Direct Debit export"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,state:0
+msgid "Expired"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,partner_bank_id:0
+msgid "Bank Account"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_first
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_first
+msgid "Sequence Type set to First"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:233
+#, python-format
+msgid "As you changed the bank account attached to this mandate, the 'Sequence Type' has been set back to 'First'."
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,message_ids:0
+msgid "Messages and communication history"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+msgid "Search SEPA Direct Debit Mandates"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,unique_mandate_reference:0
+msgid "Unique Mandate Reference"
+msgstr ""
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd.wizard,file:0
+msgid "File"
+msgstr ""
+

=== added file 'account_banking_sepa_direct_debit/i18n/fr.po'
--- account_banking_sepa_direct_debit/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/i18n/fr.po	2013-11-13 21:07:27 +0000
@@ -0,0 +1,652 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_banking_sepa_direct_debit
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-11 14:04+0000\n"
+"PO-Revision-Date: 2013-11-11 14:04+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_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.mandate_valid
+msgid "SEPA Direct Debit Mandate Validated"
+msgstr "Mandat de prélèvement SEPA validé"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,filename:0
+#: field:banking.export.sdd.wizard,filename:0
+msgid "Filename"
+msgstr "Nom du fichier"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,requested_collec_date:0
+#: field:banking.export.sdd.wizard,requested_collec_date:0
+msgid "Requested Collection Date"
+msgstr "Date de collecte demandée"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:276
+#, python-format
+msgid "The SEPA Direct Debit mandate with reference '%s' for partner '%s' has expired."
+msgstr "Le mandat de prélèvement SEPA portant la référence '%s' pour le partenaire '%s' a expiré."
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:186
+#, python-format
+msgid "Cannot validate the mandate '%s' without a date of signature."
+msgstr "Impossible de valider le mandat '%s' sans date de signature."
+
+#. module: account_banking_sepa_direct_debit
+#: selection:sdd.mandate,recurrent_sequence_type:0
+msgid "Final"
+msgstr "Final"
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd.wizard,state:0
+msgid "Finish"
+msgstr "Finir"
+
+#. module: account_banking_sepa_direct_debit
+#: view:res.partner:0
+#: view:res.partner.bank:0
+msgid "SDD Mandates"
+msgstr "Mandats SEPA"
+
+#. module: account_banking_sepa_direct_debit
+#: constraint:payment.line:0
+#: constraint:sdd.mandate:0
+msgid "Error msg in raise"
+msgstr "Error msg in raise"
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,state:0
+msgid "Reconciled"
+msgstr "Réconcilié"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,recurrent_sequence_type:0
+msgid "Sequence Type for Next Debit"
+msgstr "Type de séquence pour le prochain prélèvement"
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,charge_bearer:0
+#: selection:banking.export.sdd.wizard,charge_bearer:0
+msgid "Borne by Creditor"
+msgstr "Supportés par le créancier"
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.sdd_mandate_action
+#: model:ir.ui.menu,name:account_banking_sepa_direct_debit.sdd_mandate_menu
+#: view:res.partner.bank:0
+#: field:res.partner.bank,sdd_mandate_ids:0
+msgid "SEPA Direct Debit Mandates"
+msgstr "Mandats de prélèvement SEPA"
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd.wizard:0
+#: view:sdd.mandate:0
+msgid "Validate"
+msgstr "Valider"
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_recurring
+msgid "Sequence Type set to Recurring"
+msgstr "Type de séquence mis à Recurring"
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd.wizard:0
+msgid "Generate"
+msgstr "Générer"
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.mandate_cancel
+msgid "SEPA Direct Debit Mandate Cancelled"
+msgstr "Mandat de prélèvement SEPA annulé"
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,charge_bearer:0
+#: selection:banking.export.sdd.wizard,charge_bearer:0
+msgid "Borne by Debtor"
+msgstr "Supportés par le débiteur"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:180
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:185
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:190
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:197
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:203
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:336
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:89
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:115
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:121
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:130
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:168
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:219
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:269
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:275
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:287
+#, python-format
+msgid "Error:"
+msgstr "Erreur :"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_ids:0
+msgid "Messages"
+msgstr "Messages"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:131
+#, python-format
+msgid "The '%s' is empty or 0. It should have a non-null value."
+msgstr "Le champ '%s' est vide ou nul. Il doit avoir une valeur non nulle."
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:89
+#, python-format
+msgid "This IBAN is not valid : %s"
+msgstr "Cet IBAN n'est pas valide : %s"
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd_wizard
+msgid "Export SEPA Direct Debit XML file"
+msgstr "Export des fichiers de prélèvement SEPA"
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,state:0
+msgid "Cancelled"
+msgstr "Annulé"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:219
+#, python-format
+msgid "Payment Type Code '%s' is not supported. The only Payment Type Code supported for SEPA Direct Debit are 'pain.008.001.02', 'pain.008.001.03' and 'pain.008.001.04'."
+msgstr "Le code du Type de paiement '%s' n'est pas supporté. Les seuls codes de Type de paiement supportés pour les prélèvements SEPA sont 'pain.008.001.02', 'pain.008.001.03' et 'pain.008.001.04'."
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,message_unread:0
+msgid "If checked new messages require your attention."
+msgstr "If checked new messages require your attention."
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd.wizard,file_id:0
+msgid "SDD File"
+msgstr "Fichier de prélèvement SEPA"
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.mandate_expired
+msgid "SEPA Direct Debit Mandate has Expired"
+msgstr "Le mandat de prélèvement SEPA a expiré"
+
+#. module: account_banking_sepa_direct_debit
+#: help:banking.export.sdd,charge_bearer:0
+#: help:banking.export.sdd.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 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_direct_debit
+#: view:sdd.mandate:0
+msgid "Reference"
+msgstr "Référence"
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd:0
+msgid "SEPA Direct Debit"
+msgstr "Prélèvement SEPA"
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd.wizard:0
+msgid "SEPA Direct Debit XML file generation"
+msgstr "Génération de fichiers de prélèvement SEPA XML"
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,message_summary:0
+msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
+msgstr "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_payment_line
+msgid "Payment Line"
+msgstr "Ligne de paiement"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,create_date:0
+msgid "Generation Date"
+msgstr "Date de génération"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:337
+#, python-format
+msgid "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')."
+msgstr "La ligne de paiement portant la référence '%s' est configurée avec le compte bancaire '%s' qui n'est pas rattaché au mandat '%s' (ce mandat est rattaché au compte bancaire '%s')."
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd.wizard,state:0
+msgid "Create"
+msgstr "Créer"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,nb_transactions:0
+#: field:banking.export.sdd.wizard,nb_transactions:0
+msgid "Number of Transactions"
+msgstr "Nombre de transactions"
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,type:0
+msgid "One-Off"
+msgstr "One-Off"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,state:0
+#: field:banking.export.sdd.wizard,state:0
+msgid "State"
+msgstr "État"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:204
+#, python-format
+msgid "The recurrent mandate '%s' must have a sequence type."
+msgstr "Le mandat récurrent '%s' doit avoir un type de séquence."
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_follower_ids:0
+msgid "Followers"
+msgstr "Followers"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_unread:0
+msgid "Unread Messages"
+msgstr "Unread Messages"
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd:0
+#: field:banking.export.sdd,payment_order_ids:0
+#: field:banking.export.sdd.wizard,payment_order_ids:0
+msgid "Payment Orders"
+msgstr "Ordres de paiement"
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+msgid "Type"
+msgstr "Type"
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,state:0
+msgid "Sent"
+msgstr "Envoyé"
+
+#. module: account_banking_sepa_direct_debit
+#: selection:sdd.mandate,recurrent_sequence_type:0
+msgid "Recurring"
+msgstr "Recurring"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:181
+#, python-format
+msgid "The date of signature of mandate '%s' is in the future!"
+msgstr "La date de signature du mandat '%s' est dans le futur !"
+
+#. module: account_banking_sepa_direct_debit
+#: help:res.company,sepa_creditor_identifier:0
+msgid "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"
+msgstr "Entrez l'Identifiant créancier qui a été attribué à votre société pour réaliser des prélèvements SEPA. Cet identifiant est composé de :\n"
+"- du code ISO de votre pays (2 lettres)\n"
+"- un code de contrôle à 2 chiffres\n"
+"- un code d'activité à 3 lettres\n"
+"- un identifiant national"
+
+#. module: account_banking_sepa_direct_debit
+#: sql_constraint:sdd.mandate:0
+msgid "A Mandate with the same reference already exists for this company !"
+msgstr "Un mandat avec la même référence existe déjà pour cette société !"
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,state:0
+msgid "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."
+msgstr "Seuls des mandats valides peuvent être utilisés dans une ligne de paiement. Un mandate annulé est un mandat qui a été annulé par le client. Un mandat One-Off expire à l'issue de sa première utilisation. Un mandate récurrent expire après sa dernière utilisation ou si il n'a pas été utilisé pendant 36 mois."
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,recurrent_sequence_type:0
+msgid "This field is only used for Recurrent mandates, not for One-Off mandates."
+msgstr "Ce champ n'est utilisé que pour les mandats récurrents, pas pour les mandats One-Off."
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+msgid "Signature Date"
+msgstr "Date de signature"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,charge_bearer:0
+#: field:banking.export.sdd.wizard,charge_bearer:0
+msgid "Charge Bearer"
+msgstr "Répartition des frais"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,partner_id:0
+msgid "Partner"
+msgstr "Partenaire"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:125
+#, python-format
+msgid "Field type error:"
+msgstr "Erreur de type de champ :"
+
+#. module: account_banking_sepa_direct_debit
+#: selection:sdd.mandate,recurrent_sequence_type:0
+msgid "First"
+msgstr "First"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,signature_date:0
+msgid "Date of Signature of the Mandate"
+msgstr "Date de signature du mandat"
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.mandate_cancel
+msgid "Mandate Cancelled"
+msgstr "Mandat annulé"
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.act_banking_export_sdd_payment_order
+#: model:ir.actions.act_window,name:account_banking_sepa_direct_debit.action_account_banking_sdd
+#: model:ir.ui.menu,name:account_banking_sepa_direct_debit.menu_account_banking_sdd
+msgid "Generated SEPA Direct Debit Files"
+msgstr "Fichiers de prélèvement SEPA générés"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,company_id:0
+msgid "Company"
+msgstr "Société"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:191
+#, python-format
+msgid "Cannot validate the mandate '%s' because it is not attached to a bank account."
+msgstr "Impossible de valider le mandat '%s' car il n'est pas rattaché à un compte bancaire."
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,state:0
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,state:0
+msgid "Draft"
+msgstr "Brouillon"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:232
+#, python-format
+msgid "Mandate update"
+msgstr "Mise-à-jour du mandat"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:116
+#, python-format
+msgid "Cannot compute the '%s' of the Payment Line with Invoice Reference '%s'."
+msgstr "Impossible de générer le '%s' de la ligne de paiement ayant la référence de facture '%s'."
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,charge_bearer:0
+#: selection:banking.export.sdd.wizard,charge_bearer:0
+msgid "Shared"
+msgstr "Partagée"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,batch_booking:0
+#: field:banking.export.sdd.wizard,batch_booking:0
+msgid "Batch Booking"
+msgstr "Crédit groupé"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,state:0
+msgid "Status"
+msgstr "Statut"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,total_amount:0
+#: field:banking.export.sdd.wizard,total_amount:0
+msgid "Total Amount"
+msgstr "Montant total"
+
+#. module: account_banking_sepa_direct_debit
+#: help:banking.export.sdd,batch_booking:0
+#: help:banking.export.sdd.wizard,batch_booking:0
+msgid "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."
+msgstr "Si activé, le relevé de compte ne fera apparaître qu'une ligne de crédit pour tous les prélèvements du fichier SEPA ; si désactivé, le relevé de banque fera apparaître une ligne de crédit pour chaque prélèvement du fichier SEPA."
+
+#. module: account_banking_sepa_direct_debit
+#: selection:banking.export.sdd,charge_bearer:0
+#: selection:banking.export.sdd.wizard,charge_bearer:0
+msgid "Following Service Level"
+msgstr "Suivant le niveau de service"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:198
+#, python-format
+msgid "The mandate '%s' can't have a date of last debit before the date of signature."
+msgstr "Le mandat '%s' ne peut pas avoir une date de dernier débit antérieure à la date de signature."
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_final
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_final
+msgid "Sequence Type set to Final"
+msgstr "Type de Séquence mis à Final"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_is_follower:0
+msgid "Is a Follower"
+msgstr "Is a Follower"
+
+#. module: account_banking_sepa_direct_debit
+#: view:payment.order:0
+msgid "SDD Mandate"
+msgstr "Mandat de prélèvement"
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_res_company
+msgid "Companies"
+msgstr "Sociétés"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,message_summary:0
+msgid "Summary"
+msgstr "Résumé"
+
+#. module: account_banking_sepa_direct_debit
+#: field:account.invoice,sdd_mandate_id:0
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_sdd_mandate
+#: field:payment.line,sdd_mandate_id:0
+#: view:sdd.mandate:0
+msgid "SEPA Direct Debit Mandate"
+msgstr "Mandat de prélèvement SEPA"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:270
+#, python-format
+msgid "Missing SEPA Direct Debit mandate on the payment line with partner '%s' and Invoice ref '%s'."
+msgstr "Mandat de prélèvement SEPA manquant sur la ligne de paiement ayant pour partenaire '%s' et pour référence de facture '%s'."
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:288
+#, python-format
+msgid "The mandate with reference '%s' for partner '%s' has type set to 'One-Off' and it has a last debit date set to '%s', so we can't use it."
+msgstr "Le mandat portant la référence '%s' pour le partenaire '%s' est de type 'One-Off' et il a une date de dernier débit au '%s', donc il n'est pas utilisable."
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,scan:0
+msgid "Scan of the Mandate"
+msgstr "Scan du mandat"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,last_debit_date:0
+msgid "Date of the Last Debit"
+msgstr "Date du dernier prélèvement"
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.mandate_expired
+msgid "Mandate Expired"
+msgstr "Mandat expiré"
+
+#. module: account_banking_sepa_direct_debit
+#: constraint:res.company:0
+msgid "Invalid SEPA Creditor Identifier."
+msgstr "Identifiant créancier SEPA invalide."
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_res_partner_bank
+msgid "Bank Accounts"
+msgstr "Comptes bancaires"
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd:0
+msgid "General Information"
+msgstr "Informations générales"
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,state:0
+msgid "Valid"
+msgstr "Valide"
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_account_invoice
+msgid "Invoice"
+msgstr "Facture"
+
+#. module: account_banking_sepa_direct_debit
+#: view:banking.export.sdd.wizard:0
+#: view:sdd.mandate:0
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: field:sdd.mandate,payment_line_ids:0
+msgid "Related Payment Lines"
+msgstr "Lignes de paiement associées"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.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 "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_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,type:0
+msgid "Recurrent"
+msgstr "Récurrent"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,type:0
+msgid "Type of Mandate"
+msgstr "Type de mandat"
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.mandate_valid
+msgid "Mandate Validated"
+msgstr "Mandat validé"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd,file:0
+msgid "SEPA File"
+msgstr "SEPA File"
+
+#. module: account_banking_sepa_direct_debit
+#: field:res.company,sepa_creditor_identifier:0
+msgid "SEPA Creditor Identifier"
+msgstr "Identifiant créancier SEPA"
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:122
+#, python-format
+msgid "Cannot compute the '%s'."
+msgstr "Impossible de calculer le '%s'."
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/wizard/export_sdd.py:126
+#, python-format
+msgid "The type of the field '%s' is %s. It should be a string or unicode."
+msgstr "Le champ '%s' est de type %s. Il devrait être de type string ou unicode."
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.model,name:account_banking_sepa_direct_debit.model_banking_export_sdd
+msgid "SEPA Direct Debit export"
+msgstr "Export de prélèvement SEPA"
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+#: selection:sdd.mandate,state:0
+msgid "Expired"
+msgstr "Expiré"
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,partner_bank_id:0
+msgid "Bank Account"
+msgstr "Compte bancaire"
+
+#. module: account_banking_sepa_direct_debit
+#: model:mail.message.subtype,description:account_banking_sepa_direct_debit.recurrent_sequence_type_first
+#: model:mail.message.subtype,name:account_banking_sepa_direct_debit.recurrent_sequence_type_first
+msgid "Sequence Type set to First"
+msgstr "Type de Séquence mis à First"
+
+#. module: account_banking_sepa_direct_debit
+#: model:ir.actions.act_window,help:account_banking_sepa_direct_debit.sdd_mandate_action
+msgid "<p class=\"oe_view_nocontent_create\">\n"
+"        Click to create a new SEPA Direct Debit Mandate.\n"
+"        </p><p>\n"
+"        A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account.\n"
+"        </p>\n"
+"    "
+msgstr "<p class=\"oe_view_nocontent_create\">\n"
+"        Cliquez pour créer un mandat de prélèvement SEPA.\n"
+"        </p><p>\n"
+"        Un mandat de prélèvement SEPA est un document signé par votre client qui vous donne l'autorisation de réaliser un ou plusieurs prélèvements sur son compte bancaire.\n"
+"        </p>\n"
+"    "
+
+#. module: account_banking_sepa_direct_debit
+#: code:addons/account_banking_sepa_direct_debit/account_banking_sdd.py:233
+#, python-format
+msgid "As you changed the bank account attached to this mandate, the 'Sequence Type' has been set back to 'First'."
+msgstr "Etant donné que vous avez changé le compte bancaire associé à ce mandat, le 'Type de séquence' a été remis à 'First'."
+
+#. module: account_banking_sepa_direct_debit
+#: help:sdd.mandate,message_ids:0
+msgid "Messages and communication history"
+msgstr "Messages and communication history"
+
+#. module: account_banking_sepa_direct_debit
+#: view:sdd.mandate:0
+msgid "Search SEPA Direct Debit Mandates"
+msgstr "Recherche dans les mandats de prélèvement SEPA"
+
+#. module: account_banking_sepa_direct_debit
+#: help:banking.export.sdd.wizard,requested_collec_date:0
+msgid "This is the date on which you would like the collection to be made by the bank. Please keep in mind that there are minimum delays for SEPA direct debits that depend on the type of mandate and the type of sequence."
+msgstr "Entrez la date à laquelle vous voudriez que le prélèvement soit effectué par la banque. Gardez en mémoire qu'il y a un délai minimum pour les prélèvements SEPA qui dépend du type de mandat et du type de séquence."
+
+#. module: account_banking_sepa_direct_debit
+#: field:sdd.mandate,unique_mandate_reference:0
+msgid "Unique Mandate Reference"
+msgstr "Référence unique de mandat"
+
+#. module: account_banking_sepa_direct_debit
+#: field:banking.export.sdd.wizard,file:0
+msgid "File"
+msgstr "Fichier"
+

=== added file 'account_banking_sepa_direct_debit/mandate_expire_cron.xml'
--- account_banking_sepa_direct_debit/mandate_expire_cron.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/mandate_expire_cron.xml	2013-11-13 21:07:27 +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 noupdate="1"> <!-- noupdate = 1 for the 'active' field -->
+<record id="sdd_mandate_expire_cron" model="ir.cron">
+    <field name="name">Set SEPA Direct Debit Mandates to Expired</field>
+    <field name="active" eval="True"/>
+    <field name="user_id" ref="base.user_root"/>
+    <field name="interval_number">1</field>
+    <field name="interval_type">days</field>
+    <field name="numbercall">-1</field> <!-- don't limit the number of calls -->
+    <field name="doall" eval="False"/>
+    <field name="model" eval="'sdd.mandate'"/>
+    <field name="function" eval="'_sdd_mandate_set_state_to_expired'" />
+    <field name="args" eval="'()'"/>
+</record>
+
+</data>
+</openerp>

=== added file 'account_banking_sepa_direct_debit/res_partner_bank_view.xml'
--- account_banking_sepa_direct_debit/res_partner_bank_view.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/res_partner_bank_view.xml	2013-11-13 21:07:27 +0000
@@ -0,0 +1,48 @@
+<?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_mandate_partner_bank_form" model="ir.ui.view">
+    <field name="name">sdd.mandate.res.partner.bank.form</field>
+    <field name="model">res.partner.bank</field>
+    <field name="inherit_id" ref="base.view_partner_bank_form"/>
+    <field name="arch" type="xml">
+        <group name="bank" position="after">
+            <group name="sdd_mandates" string="SEPA Direct Debit Mandates" colspan="4">
+                <field name="sdd_mandate_ids" context="{'default_partner_bank_id': active_id, 'sdd_mandate_bank_partner_view': True}" nolabel="1"/>
+            </group>
+        </group>
+    </field>
+</record>
+
+<record id="sdd_mandate_partner_bank_tree" model="ir.ui.view">
+    <field name="name">sdd.mandate.res.partner.bank.tree</field>
+    <field name="model">res.partner.bank</field>
+    <field name="inherit_id" ref="base.view_partner_bank_tree"/>
+    <field name="arch" type="xml">
+        <field name="partner_id" position="after">
+            <field name="sdd_mandate_ids" string="SDD Mandates"/>
+        </field>
+    </field>
+</record>
+
+<!-- add number of mandates in this list of bank accounts
+on the partner form -->
+<record id="sdd_mandate_partner_form" model="ir.ui.view">
+    <field name="name">sdd.mandate.partner.form</field>
+    <field name="model">res.partner</field>
+    <field name="inherit_id" ref="account.view_partner_property_form"/>
+    <field name="arch" type="xml">
+        <xpath expr="//field[@name='bank_ids']/tree/field[@name='owner_name']" position="after">
+            <field name="sdd_mandate_ids" string="SDD Mandates"/>
+        </xpath>
+    </field>
+</record>
+
+</data>
+</openerp>

=== added file 'account_banking_sepa_direct_debit/sdd_mandate_view.xml'
--- account_banking_sepa_direct_debit/sdd_mandate_view.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/sdd_mandate_view.xml	2013-11-13 21:07:27 +0000
@@ -0,0 +1,147 @@
+<?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_mandate_form" model="ir.ui.view">
+    <field name="name">sdd.mandate.form</field>
+    <field name="model">sdd.mandate</field>
+    <field name="arch" type="xml">
+        <form string="SEPA Direct Debit Mandate" version="7.0">
+            <header>
+                <button name="validate" type="object" string="Validate" states="draft"/>
+                <button name="cancel" type="object" string="Cancel" states="draft,valid"/>
+                <field name="state" widget="statusbar"/>
+            </header>
+            <sheet>
+                <div class="oe_title">
+                    <h1>
+                        <field name="unique_mandate_reference" class="oe_inline"/>
+                    </h1>
+                </div>
+                <group name="main">
+                    <field name="company_id" groups="base.group_multi_company"/>
+                    <field name="partner_id" invisible="context.get('sdd_mandate_bank_partner_view')"/>
+                    <field name="type" on_change="mandate_type_change(type)"/>
+                    <field name="recurrent_sequence_type" attrs="{'invisible': [('type', '=', 'oneoff')], 'required': [('type', '=', 'recurrent')]}"/>
+                    <field name="signature_date"/>
+                    <field name="scan"/>
+                    <field name="last_debit_date"/>
+                    <field name="partner_bank_id"
+                        on_change="mandate_partner_bank_change(partner_bank_id, type, recurrent_sequence_type, last_debit_date, state)"
+                        invisible="context.get('sdd_mandate_bank_partner_view')"
+                        domain="[('partner_id', '=', partner_id)]"/>
+                </group>
+                <group name="payment_lines" string="Related Payment Lines">
+                    <field name="payment_line_ids" nolabel="1"/>
+                </group>
+            </sheet>
+            <div class="oe_chatter">
+                <field name="message_follower_ids" widget="mail_followers"/>
+                <field name="message_ids" widget="mail_thread"/>
+            </div>
+        </form>
+    </field>
+</record>
+
+<record id="sdd_mandate_tree" model="ir.ui.view">
+    <field name="name">sdd.mandate.tree</field>
+    <field name="model">sdd.mandate</field>
+    <field name="arch" type="xml">
+        <tree string="SEPA Direct Debit Mandate" colors="blue:state=='draft';black:state in ('expired', 'cancel')">
+            <field name="company_id" groups="base.group_multi_company"/>
+            <field name="partner_id" invisible="context.get('sdd_mandate_bank_partner_view')"/>
+            <field name="unique_mandate_reference" string="Reference"/>
+            <field name="type" string="Type"/>
+            <field name="signature_date" string="Signature Date"/>
+            <field name="last_debit_date"/>
+            <field name="state"/>
+        </tree>
+    </field>
+</record>
+
+<record id="sdd_mandate_search" model="ir.ui.view">
+    <field name="name">sdd.mandate.search</field>
+    <field name="model">sdd.mandate</field>
+    <field name="arch" type="xml">
+        <search string="Search SEPA Direct Debit Mandates">
+            <field name="partner_id"/>
+            <filter name="draft" string="Draft" domain="[('state', '=', 'draft')]" />
+            <filter name="valid" string="Valid" domain="[('state', '=', 'valid')]" />
+            <filter name="cancel" string="Cancelled" domain="[('state', '=', 'cancel')]" />
+            <filter name="expired" string="Expired" domain="[('state', '=', 'expired')]" />
+            <filter name="oneoff" string="One-Off" domain="[('type', '=', 'oneoff')]" />
+            <filter name="recurrent" string="Recurrent" domain="[('type', '=', 'recurrent')]" />
+        </search>
+    </field>
+</record>
+
+<record id="sdd_mandate_action" model="ir.actions.act_window">
+    <field name="name">SEPA Direct Debit Mandates</field>
+    <field name="res_model">sdd.mandate</field>
+    <field name="view_type">form</field>
+    <field name="view_mode">tree,form</field>
+    <field name="help" type="html">
+        <p class="oe_view_nocontent_create">
+        Click to create a new SEPA Direct Debit Mandate.
+        </p><p>
+        A SEPA Direct Debit Mandate is a document signed by your customer that gives you the autorization to do one or several direct debits on his bank account.
+        </p>
+    </field>
+</record>
+
+<menuitem id="sdd_mandate_menu"
+          parent="account_banking.menu_finance_banking_actions"
+          action="sdd_mandate_action"
+          sequence="20"
+          />
+
+<!-- notifications in the chatter -->
+<record id="mandate_valid" model="mail.message.subtype">
+    <field name="name">Mandate Validated</field>
+    <field name="res_model">sdd.mandate</field>
+    <field name="default" eval="False"/>
+    <field name="description">SEPA Direct Debit Mandate Validated</field>
+</record>
+
+<record id="mandate_expired" model="mail.message.subtype">
+    <field name="name">Mandate Expired</field>
+    <field name="res_model">sdd.mandate</field>
+    <field name="default" eval="False"/>
+    <field name="description">SEPA Direct Debit Mandate has Expired</field>
+</record>
+
+<record id="mandate_cancel" model="mail.message.subtype">
+    <field name="name">Mandate Cancelled</field>
+    <field name="res_model">sdd.mandate</field>
+    <field name="default" eval="False"/>
+    <field name="description">SEPA Direct Debit Mandate Cancelled</field>
+</record>
+
+<record id="recurrent_sequence_type_first" model="mail.message.subtype">
+    <field name="name">Sequence Type set to First</field>
+    <field name="res_model">sdd.mandate</field>
+    <field name="default" eval="False"/>
+    <field name="description">Sequence Type set to First</field>
+</record>
+
+<record id="recurrent_sequence_type_recurring" model="mail.message.subtype">
+    <field name="name">Sequence Type set to Recurring</field>
+    <field name="res_model">sdd.mandate</field>
+    <field name="default" eval="False"/>
+    <field name="description">Sequence Type set to Recurring</field>
+</record>
+
+<record id="recurrent_sequence_type_final" model="mail.message.subtype">
+    <field name="name">Sequence Type set to Final</field>
+    <field name="res_model">sdd.mandate</field>
+    <field name="default" eval="False"/>
+    <field name="description">Sequence Type set to Final</field>
+</record>
+
+</data>
+</openerp>

=== added directory 'account_banking_sepa_direct_debit/security'
=== added file 'account_banking_sepa_direct_debit/security/ir.model.access.csv'
--- account_banking_sepa_direct_debit/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/security/ir.model.access.csv	2013-11-13 21:07:27 +0000
@@ -0,0 +1,4 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_banking_export_sdd","Full access on banking.export.sdd","model_banking_export_sdd","account_payment.group_account_payment",1,1,1,1
+"access_sdd_mandate","Full access on sdd.mandate","model_sdd_mandate","account_payment.group_account_payment",1,1,1,1
+"access_sdd_mandate_read","Read access on sdd.mandate","model_sdd_mandate","base.group_user",1,0,0,0

=== added directory 'account_banking_sepa_direct_debit/static'
=== added directory 'account_banking_sepa_direct_debit/static/src'
=== added directory 'account_banking_sepa_direct_debit/static/src/img'
=== added file 'account_banking_sepa_direct_debit/static/src/img/icon.png'
Binary files account_banking_sepa_direct_debit/static/src/img/icon.png	1970-01-01 00:00:00 +0000 and account_banking_sepa_direct_debit/static/src/img/icon.png	2013-11-13 21:07:27 +0000 differ
=== added directory 'account_banking_sepa_direct_debit/wizard'
=== added file 'account_banking_sepa_direct_debit/wizard/__init__.py'
--- account_banking_sepa_direct_debit/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/wizard/__init__.py	2013-11-13 21:07:27 +0000
@@ -0,0 +1,23 @@
+# -*- 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 export_sdd

=== added file 'account_banking_sepa_direct_debit/wizard/export_sdd.py'
--- account_banking_sepa_direct_debit/wizard/export_sdd.py	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/wizard/export_sdd.py	2013-11-13 21:07:27 +0000
@@ -0,0 +1,588 @@
+# -*- 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 openerp.osv import orm, fields
+from openerp.tools.translate import _
+from openerp.tools.safe_eval import safe_eval
+from openerp import tools, netsvc
+import base64
+from datetime import datetime, timedelta
+from lxml import etree
+import logging
+from unidecode import unidecode
+
+_logger = logging.getLogger(__name__)
+
+
+class banking_export_sdd_wizard(orm.TransientModel):
+    _name = 'banking.export.sdd.wizard'
+    _description = 'Export SEPA Direct Debit 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 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."),
+        'requested_collec_date': fields.date(
+            'Requested Collection Date',
+            help='This is the date on which you would like the collection to be made by the bank. Please keep in mind that there are minimum delays for SEPA direct debits that depend on the type of mandate and the type of sequence.'),
+        '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 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.'),
+        '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.sdd', 'SDD 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_sdd_payorders_rel', 'wizard_id',
+            'payment_order_id', 'Payment Orders', readonly=True),
+        }
+
+    _defaults = {
+        'charge_bearer': 'SLEV',
+        'state': 'create',
+        }
+
+    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 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_sdd_wizard, self).create(
+            cr, uid, vals, context=context)
+
+    def _prepare_field(
+            self, cr, uid, field_name, field_value, eval_ctx, max_size=0,
+            context=None):
+        '''This function is designed to be inherited !'''
+        assert isinstance(eval_ctx, dict), 'eval_ctx must contain a dict'
+        try:
+            # 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 Core Direct Debit
+            # Customer-to-bank implementation guidelines
+            value = unidecode(safe_eval(field_value, eval_ctx))
+        except:
+            line = eval_ctx.get('line')
+            if line:
+                raise orm.except_orm(
+                    _('Error:'),
+                    _("Cannot compute the '%s' of the Payment Line with Invoice Reference '%s'.")
+                    % (field_name, self.pool['account.invoice'].name_get(
+                        cr, uid, [line.ml_inv_ref.id], context=context)[0][1]))
+            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, sepa_export, total_amount, transactions_count,
+            xml_string, context=None):
+        return {
+            'batch_booking': sepa_export.batch_booking,
+            'charge_bearer': sepa_export.charge_bearer,
+            'requested_collec_date': sepa_export.requested_collec_date,
+            'total_amount': total_amount,
+            'nb_transactions': transactions_count,
+            'file': base64.encodestring(xml_string),
+            'payment_order_ids': [
+                (6, 0, [x.id for x in sepa_export.payment_order_ids])
+            ],
+        }
+
+    def _validate_xml(self, cr, uid, xml_string, pain_flavor):
+        xsd_etree_obj = etree.parse(
+            tools.file_open(
+                'account_banking_sepa_direct_debit/data/%s.xsd'
+                % pain_flavor))
+        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 _get_previous_bank(self, cr, uid, payline, context=None):
+        payline_obj = self.pool['payment.line']
+        previous_bank = False
+        payline_ids = payline_obj.search(
+            cr, uid, [
+                ('sdd_mandate_id', '=', payline.sdd_mandate_id.id),
+                ('bank_id', '!=', payline.bank_id.id),
+            ],
+            context=context)
+        if payline_ids:
+            older_lines = payline_obj.browse(
+                cr, uid, payline_ids, context=context)
+            previous_date = False
+            previous_payline_id = False
+            for older_line in older_lines:
+                older_line_date_sent = older_line.order_id.date_sent
+                if (older_line_date_sent
+                        and older_line_date_sent > previous_date):
+                    previous_date = older_line_date_sent
+                    previous_payline_id = older_line.id
+            if previous_payline_id:
+                previous_payline = payline_obj.browse(
+                    cr, uid, previous_payline_id, context=context)
+                previous_bank = previous_payline.bank_id
+        return previous_bank
+
+    def create_sepa(self, cr, uid, ids, context=None):
+        '''
+        Creates the SEPA Direct Debit file. That's the important code !
+        '''
+        sepa_export = self.browse(cr, uid, ids[0], context=context)
+
+        pain_flavor = sepa_export.payment_order_ids[0].mode.type.code
+        if pain_flavor == 'pain.008.001.02':
+            bic_xml_tag = 'BIC'
+            name_maxsize = 70
+            root_xml_tag = 'CstmrDrctDbtInitn'
+        elif pain_flavor == 'pain.008.001.03':
+            bic_xml_tag = 'BICFI'
+            name_maxsize = 140
+            root_xml_tag = 'CstmrDrctDbtInitn'
+        elif pain_flavor == 'pain.008.001.04':
+            bic_xml_tag = 'BICFI'
+            name_maxsize = 140
+            root_xml_tag = 'CstmrDrctDbtInitn'
+        else:
+            raise orm.except_orm(_('Error:'), _("Payment Type Code '%s' is not supported. The only Payment Type Code supported for SEPA Direct Debit are 'pain.008.001.02', 'pain.008.001.03' and 'pain.008.001.04'.") % pain_flavor)
+        if sepa_export.requested_collec_date:
+            my_requested_collec_date = sepa_export.requested_collec_date
+        else:
+            my_requested_collec_date = datetime.strftime(
+                datetime.today() + timedelta(days=1), '%Y-%m-%d')
+
+        pain_ns = {
+            'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
+            None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor,
+            }
+
+        root = etree.Element('Document', nsmap=pain_ns)
+        pain_root = etree.SubElement(root, root_xml_tag)
+
+        my_company_name = self._prepare_field(
+            cr, uid, 'Company Name',
+            'sepa_export.payment_order_ids[0].company_id.partner_id.name',
+            {'sepa_export': sepa_export}, name_maxsize, context=context)
+
+        # A. Group header
+        group_header_1_0 = etree.SubElement(pain_root, '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': sepa_export}, 35, 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')
+        nb_of_transactions_1_6 = etree.SubElement(group_header_1_0, 'NbOfTxs')
+        control_sum_1_7 = etree.SubElement(group_header_1_0, 'CtrlSum')
+        initiating_party_1_8 = etree.SubElement(group_header_1_0, 'InitgPty')
+        initiating_party_name = etree.SubElement(initiating_party_1_8, 'Nm')
+        initiating_party_name.text = my_company_name
+
+        transactions_count_1_6 = 0
+        total_amount = 0.0
+        amount_control_sum_1_7 = 0.0
+        lines_per_seq_type = {}
+        # key = sequence type ; value = list of lines as objects
+        # Iterate on payment orders
+        for payment_order in sepa_export.payment_order_ids:
+            total_amount = total_amount + payment_order.total
+            # Iterate each payment lines
+            for line in payment_order.line_ids:
+                transactions_count_1_6 += 1
+                if not line.sdd_mandate_id:
+                    raise orm.except_orm(
+                        _('Error:'),
+                        _("Missing SEPA Direct Debit mandate on the payment line with partner '%s' and Invoice ref '%s'.")
+                        % (line.partner_id.name,
+                            line.ml_inv_ref.number))
+                if line.sdd_mandate_id.state != 'valid':
+                    raise orm.except_orm(
+                        _('Error:'),
+                        _("The SEPA Direct Debit mandate with reference '%s' for partner '%s' has expired.")
+                        % (line.sdd_mandate_id.unique_mandate_reference,
+                            line.sdd_mandate_id.partner_id.name))
+                if line.sdd_mandate_id.type == 'oneoff':
+                    if not line.sdd_mandate_id.last_debit_date:
+                        if lines_per_seq_type.get('OOFF'):
+                            lines_per_seq_type['OOFF'].append(line)
+                        else:
+                            lines_per_seq_type['OOFF'] = [line]
+                    else:
+                        raise orm.except_orm(
+                            _('Error:'),
+                            _("The mandate with reference '%s' for partner '%s' has type set to 'One-Off' and it has a last debit date set to '%s', so we can't use it.")
+                            % (line.sdd_mandate_id.unique_mandate_reference,
+                                line.sdd_mandate_id.partner_id.name,
+                                line.sdd_mandate_id.last_debit_date))
+                elif line.sdd_mandate_id.type == 'recurrent':
+                    seq_type_map = {
+                        'recurring': 'RCUR',
+                        'first': 'FRST',
+                        'final': 'FNAL',
+                        }
+                    seq_type_label = line.sdd_mandate_id.recurrent_sequence_type
+                    assert seq_type_label is not False
+                    seq_type = seq_type_map[seq_type_label]
+                    if lines_per_seq_type.get(seq_type):
+                        lines_per_seq_type[seq_type].append(line)
+                    else:
+                        lines_per_seq_type[seq_type] = [line]
+
+        for sequence_type, lines in lines_per_seq_type.items():
+            # B. Payment info
+            payment_info_2_0 = etree.SubElement(pain_root, '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',
+                "sequence_type + '-' + sepa_export.payment_order_ids[0].reference",
+                {'sepa_export': sepa_export, 'sequence_type': sequence_type},
+                35, context=context)
+            payment_method_2_2 = etree.SubElement(payment_info_2_0, 'PmtMtd')
+            payment_method_2_2.text = 'DD'
+            # batch_booking is in "Payment Info" with pain.008.001.02/03
+            batch_booking_2_3 = etree.SubElement(payment_info_2_0, 'BtchBookg')
+            batch_booking_2_3.text = str(sepa_export.batch_booking).lower()
+            # The "SEPA Core Direct Debit Scheme Customer-to-bank
+            # Implementation guidelines" v6.0 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')
+            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'
+            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 = 'CORE'
+            # 2.14 Sequence Type MANDATORY
+            # this message element must indicate ‘FRST
+            # 'FRST' = First ; 'OOFF' = One Off ; 'RCUR' : Recurring
+            # 'FNAL' = Final
+            sequence_type_2_14 = etree.SubElement(
+                payment_type_info_2_6, 'SeqTp')
+            sequence_type_2_14.text = sequence_type
+
+            requested_collec_date_2_18 = etree.SubElement(
+                payment_info_2_0, 'ReqdColltnDt')
+            requested_collec_date_2_18.text = my_requested_collec_date
+            creditor_2_19 = etree.SubElement(payment_info_2_0, 'Cdtr')
+            creditor_name = etree.SubElement(creditor_2_19, 'Nm')
+            creditor_name.text = my_company_name
+            creditor_account_2_20 = etree.SubElement(
+                payment_info_2_0, 'CdtrAcct')
+            creditor_account_id = etree.SubElement(creditor_account_2_20, 'Id')
+            creditor_account_iban = etree.SubElement(
+                creditor_account_id, 'IBAN')
+            creditor_account_iban.text = self._validate_iban(
+                cr, uid, self._prepare_field(
+                    cr, uid, 'Company IBAN',
+                    'sepa_export.payment_order_ids[0].mode.bank_id.acc_number',
+                    {'sepa_export': sepa_export}, context=context),
+                context=context)
+
+            creditor_agent_2_21 = etree.SubElement(payment_info_2_0, 'CdtrAgt')
+            creditor_agent_institution = etree.SubElement(
+                creditor_agent_2_21, 'FinInstnId')
+            creditor_agent_bic = etree.SubElement(
+                creditor_agent_institution, bic_xml_tag)
+            creditor_agent_bic.text = self._prepare_field(
+                cr, uid, 'Company BIC',
+                'sepa_export.payment_order_ids[0].mode.bank_id.bank.bic',
+                {'sepa_export': sepa_export}, context=context)
+
+            charge_bearer_2_24 = etree.SubElement(payment_info_2_0, 'ChrgBr')
+            charge_bearer_2_24.text = sepa_export.charge_bearer
+
+            creditor_scheme_identification_2_27 = etree.SubElement(
+                payment_info_2_0, 'CdtrSchmeId')
+            csi_id = etree.SubElement(
+                creditor_scheme_identification_2_27, '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, 'SEPA Creditor Identifier',
+                'sepa_export.payment_order_ids[0].company_id.sepa_creditor_identifier',
+                {'sepa_export': sepa_export}, 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 = 'SEPA'
+
+            transactions_count_2_4 = 0
+            amount_control_sum_2_5 = 0.0
+            for line in lines:
+                transactions_count_2_4 += 1
+                # C. Direct Debit Transaction Info
+                dd_transaction_info_2_28 = etree.SubElement(
+                    payment_info_2_0, 'DrctDbtTxInf')
+                payment_identification_2_29 = etree.SubElement(
+                    dd_transaction_info_2_28, 'PmtId')
+                end2end_identification_2_31 = etree.SubElement(
+                    payment_identification_2_29, 'EndToEndId')
+                end2end_identification_2_31.text = self._prepare_field(
+                    cr, uid, 'End to End Identification', 'line.name',
+                    {'line': line}, 35, context=context)
+                currency_name = self._prepare_field(
+                    cr, uid, 'Currency Code', 'line.currency.name',
+                    {'line': line}, 3, context=context)
+                instructed_amount_2_44 = etree.SubElement(
+                    dd_transaction_info_2_28, 'InstdAmt', Ccy=currency_name)
+                instructed_amount_2_44.text = '%.2f' % line.amount_currency
+                amount_control_sum_1_7 += line.amount_currency
+                amount_control_sum_2_5 += line.amount_currency
+                dd_transaction_2_46 = etree.SubElement(
+                    dd_transaction_info_2_28, 'DrctDbtTx')
+                mandate_related_info_2_47 = etree.SubElement(
+                    dd_transaction_2_46, 'MndtRltdInf')
+                mandate_identification_2_48 = etree.SubElement(
+                    mandate_related_info_2_47, 'MndtId')
+                mandate_identification_2_48.text = self._prepare_field(
+                    cr, uid, 'Unique Mandate Reference',
+                    'line.sdd_mandate_id.unique_mandate_reference',
+                    {'line': line}, 35, context=context)
+                mandate_signature_date_2_49 = etree.SubElement(
+                    mandate_related_info_2_47, 'DtOfSgntr')
+                mandate_signature_date_2_49.text = self._prepare_field(
+                    cr, uid, 'Mandate Signature Date',
+                    'line.sdd_mandate_id.signature_date',
+                    {'line': line}, 10, context=context)
+                if (sequence_type == 'FRST'
+                        and line.sdd_mandate_id.last_debit_date):
+                    previous_bank = self._get_previous_bank(
+                        cr, uid, line, context=context)
+                    if previous_bank:
+                        amendment_indicator_2_50 = etree.SubElement(
+                            mandate_related_info_2_47, 'AmdmntInd')
+                        amendment_indicator_2_50.text = 'true'
+                        amendment_info_details_2_51 = etree.SubElement(
+                            mandate_related_info_2_47, 'AmdmntInfDtls')
+                        if previous_bank.bank.bic == line.bank_id.bank.bic:
+                            ori_debtor_account_2_57 = etree.SubElement(
+                                amendment_info_details_2_51, 'OrgnlDbtrAcct')
+                            ori_debtor_account_id = etree.SubElement(
+                                ori_debtor_account_2_57, 'Id')
+                            ori_debtor_account_iban = etree.SubElement(
+                                ori_debtor_account_id, 'IBAN')
+                            ori_debtor_account_iban.text = self._validate_iban(
+                                cr, uid, self._prepare_field(
+                                    cr, uid, 'Original Debtor Account',
+                                    'previous_bank.acc_number',
+                                    {'previous_bank': previous_bank},
+                                    context=context),
+                                context=context)
+                        else:
+                            ori_debtor_agent_2_58 = etree.SubElement(
+                                amendment_info_details_2_51, 'OrgnlDbtrAgt')
+                            ori_debtor_agent_institution = etree.SubElement(
+                                ori_debtor_agent_2_58, 'FinInstnId')
+                            ori_debtor_agent_bic = etree.SubElement(
+                                ori_debtor_agent_institution, bic_xml_tag)
+                            ori_debtor_agent_bic.text = self._prepare_field(
+                                cr, uid, 'Original Debtor Agent',
+                                'previous_bank.bank.bic',
+                                {'previous_bank': previous_bank},
+                                context=context)
+                            ori_debtor_agent_other = etree.SubElement(
+                                ori_debtor_agent_institution, 'Othr')
+                            ori_debtor_agent_other_id = etree.SubElement(
+                                ori_debtor_agent_other, 'Id')
+                            ori_debtor_agent_other_id.text = 'SMNDA'
+                            # SMNDA = Same Mandate New Debtor Agent
+
+                debtor_agent_2_70 = etree.SubElement(
+                    dd_transaction_info_2_28, 'DbtrAgt')
+                debtor_agent_institution = etree.SubElement(
+                    debtor_agent_2_70, 'FinInstnId')
+                debtor_agent_bic = etree.SubElement(
+                    debtor_agent_institution, bic_xml_tag)
+                debtor_agent_bic.text = self._prepare_field(
+                    cr, uid, 'Customer BIC', 'line.bank_id.bank.bic',
+                    {'line': line}, context=context)
+                debtor_2_72 = etree.SubElement(
+                    dd_transaction_info_2_28, 'Dbtr')
+                debtor_name = etree.SubElement(debtor_2_72, 'Nm')
+                debtor_name.text = self._prepare_field(
+                    cr, uid, 'Customer Name', 'line.partner_id.name',
+                    {'line': line}, name_maxsize, context=context)
+                debtor_account_2_73 = etree.SubElement(
+                    dd_transaction_info_2_28, 'DbtrAcct')
+                debtor_account_id = etree.SubElement(debtor_account_2_73, 'Id')
+                debtor_account_iban = etree.SubElement(
+                    debtor_account_id, 'IBAN')
+                debtor_account_iban.text = self._validate_iban(
+                    cr, uid, self._prepare_field(
+                        cr, uid, 'Customer IBAN',
+                        'line.bank_id.acc_number', {'line': line},
+                        context=context),
+                    context=context)
+                remittance_info_2_88 = etree.SubElement(
+                    dd_transaction_info_2_28, 'RmtInf')
+                # switch to Structured (Strdr) ? If we do it, beware that the format is not the same between pain 02 and pain 03
+                remittance_info_unstructured_2_89 = etree.SubElement(
+                    remittance_info_2_88, 'Ustrd')
+                remittance_info_unstructured_2_89.text = self._prepare_field(
+                    cr, uid, 'Remittance Information', 'line.communication',
+                    {'line': line}, 140, context=context)
+            nb_of_transactions_2_4.text = str(transactions_count_2_4)
+            control_sum_2_5.text = '%.2f' % amount_control_sum_2_5
+        nb_of_transactions_1_6.text = str(transactions_count_1_6)
+        control_sum_1_7.text = '%.2f' % amount_control_sum_1_7
+
+        xml_string = etree.tostring(
+            root, pretty_print=True, encoding='UTF-8', xml_declaration=True)
+        _logger.debug(
+            "Generated SDD XML file in format %s below" % pain_flavor)
+        _logger.debug(xml_string)
+        self._validate_xml(cr, uid, xml_string, pain_flavor)
+
+        # CREATE the banking.export.sepa record
+        file_id = self.pool.get('banking.export.sdd').create(
+            cr, uid, self._prepare_export_sepa(
+                cr, uid, sepa_export, total_amount, transactions_count_1_6,
+                xml_string, context=context),
+            context=context)
+
+        self.write(
+            cr, uid, ids, {
+                'file_id': file_id,
+                'state': 'finish',
+            }, context=context)
+
+        action = {
+            'name': 'SEPA Direct Debit 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 cancel_sepa(self, cr, uid, ids, context=None):
+        '''
+        Cancel the SEPA Direct Debit file: just drop the file
+        '''
+        sepa_export = self.browse(cr, uid, ids[0], context=context)
+        self.pool.get('banking.export.sdd').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 Direct Debit file: mark all payments in the file
+        as 'sent'. Write 'last debit date' on mandate and set oneoff
+        mandate to expired
+        '''
+        sepa_export = self.browse(cr, uid, ids[0], context=context)
+        self.pool.get('banking.export.sdd').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)
+            mandate_ids = [line.sdd_mandate_id.id for line in order.line_ids]
+            self.pool['sdd.mandate'].write(
+                cr, uid, mandate_ids,
+                {'last_debit_date': datetime.today().strftime('%Y-%m-%d')},
+                context=context)
+            to_expire_ids = []
+            first_mandate_ids = []
+            for line in order.line_ids:
+                if line.sdd_mandate_id.type == 'oneoff':
+                    to_expire_ids.append(line.sdd_mandate_id.id)
+                elif line.sdd_mandate_id.type == 'recurrent':
+                    seq_type = line.sdd_mandate_id.recurrent_sequence_type
+                    if seq_type == 'final':
+                        to_expire_ids.append(line.sdd_mandate_id.id)
+                    elif seq_type == 'first':
+                        first_mandate_ids.append(line.sdd_mandate_id.id)
+            self.pool['sdd.mandate'].write(
+                cr, uid, to_expire_ids, {'state': 'expired'}, context=context)
+            self.pool['sdd.mandate'].write(
+                cr, uid, first_mandate_ids,
+                {'recurrent_sequence_type': 'recurring'}, context=context)
+        return {'type': 'ir.actions.act_window_close'}

=== added file 'account_banking_sepa_direct_debit/wizard/export_sdd_view.xml'
--- account_banking_sepa_direct_debit/wizard/export_sdd_view.xml	1970-01-01 00:00:00 +0000
+++ account_banking_sepa_direct_debit/wizard/export_sdd_view.xml	2013-11-13 21:07:27 +0000
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright (C) 2010-2012 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_sdd_wizard_view" model="ir.ui.view">
+    <field name="name">banking.export.sdd.wizard.view</field>
+    <field name="model">banking.export.sdd.wizard</field>
+    <field name="arch" type="xml">
+        <form string="SEPA Direct Debit XML file generation" version="7.0">
+            <field name="state" invisible="True"/>
+            <group states="create">
+                <field name="batch_booking" />
+                <field name="requested_collec_date" />
+                <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>
+            <footer>
+                <button string="Generate" name="create_sepa" type="object" class="oe_highlight" states="create"/>
+                <button string="Cancel" special="cancel" class="oe_link" states="create"/>
+                <button string="Validate" name="save_sepa" type="object" class="oe_highlight" states="finish"/>
+                <button string="Cancel" name="cancel_sepa" type="object" class="oe_link" states="finish"/>
+            </footer>
+        </form>
+    </field>
+</record>
+
+</data>
+</openerp>

=== modified file 'account_direct_debit/model/account_invoice.py'
--- account_direct_debit/model/account_invoice.py	2013-05-28 13:41:42 +0000
+++ account_direct_debit/model/account_invoice.py	2013-11-13 21:07:27 +0000
@@ -22,7 +22,7 @@
 #
 ##############################################################################
 
-from openerp.osv import orm, fields
+from openerp.osv import orm
 from openerp.tools.translate import _
 
 """
@@ -143,11 +143,11 @@
             if self.test_paid(cr, uid, [invoice_id], context):
                 number = self.read(
                     cr, uid, invoice_id, ['number'], context=context)['number']
-                raise osv.except_osv(
+                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)
+        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)

=== modified file 'account_direct_debit/model/account_move_line.py'
--- account_direct_debit/model/account_move_line.py	2013-06-04 10:18:31 +0000
+++ account_direct_debit/model/account_move_line.py	2013-11-13 21:07:27 +0000
@@ -87,6 +87,37 @@
             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'))
+        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=payment_mode_id, context=context)
+
     _columns = {
         'amount_to_receive': fields.function(
             amount_to_receive, method=True,

=== modified file 'account_direct_debit/view/account_payment.xml'
--- account_direct_debit/view/account_payment.xml	2013-08-12 09:21:00 +0000
+++ account_direct_debit/view/account_payment.xml	2013-11-13 21:07:27 +0000
@@ -46,6 +46,9 @@
                                 icon="gtk-find"
                                 />
                     </xpath>
+                    <field name="mode" position="attributes">
+                        <attribute name="domain">[('payment_order_type', '=', payment_order_type)]</attribute>
+                    </field>
                 </data>
             </field>
         </record>


Follow ups