Merge lp:~akretion-team/banking-addons/61-sepa-direct-debit into lp:banking-addons/6.1

Proposed by Alexis de Lattre
Status: Work in progress
Proposed branch: lp:~akretion-team/banking-addons/61-sepa-direct-debit
Merge into: lp:banking-addons/6.1
Diff against target: 9652 lines (+8331/-602) (has conflicts)
50 files modified
account_banking/account_banking.py (+10/-1)
account_banking/wizard/account_payment_order.py (+3/-3)
account_banking_pain_base/__init__.py (+26/-0)
account_banking_pain_base/__openerp__.py (+50/-0)
account_banking_pain_base/banking_export_pain.py (+409/-0)
account_banking_pain_base/company.py (+78/-0)
account_banking_pain_base/company_view.xml (+24/-0)
account_banking_pain_base/i18n/account_banking_pain_base.pot (+146/-0)
account_banking_pain_base/i18n/fr.po (+146/-0)
account_banking_pain_base/payment_line.py (+52/-0)
account_banking_pain_base/payment_line_view.xml (+43/-0)
account_banking_pain_base/payment_mode.py (+39/-0)
account_banking_pain_base/payment_mode_view.xml (+22/-0)
account_banking_sepa_credit_transfer/__init__.py (+2/-3)
account_banking_sepa_credit_transfer/__openerp__.py (+8/-6)
account_banking_sepa_credit_transfer/account_banking_sepa.py (+44/-34)
account_banking_sepa_credit_transfer/account_banking_sepa_view.xml (+7/-10)
account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd (+931/-0)
account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml (+13/-8)
account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot (+80/-124)
account_banking_sepa_credit_transfer/i18n/fr.po (+88/-132)
account_banking_sepa_credit_transfer/i18n/nl.po (+405/-0)
account_banking_sepa_credit_transfer/wizard/__init__.py (+1/-1)
account_banking_sepa_credit_transfer/wizard/export_sepa.py (+205/-253)
account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml (+9/-21)
account_banking_sepa_direct_debit/__init__.py (+25/-0)
account_banking_sepa_direct_debit/__openerp__.py (+61/-0)
account_banking_sepa_direct_debit/account_banking_sdd.py (+396/-0)
account_banking_sepa_direct_debit/account_banking_sdd_view.xml (+82/-0)
account_banking_sepa_direct_debit/account_invoice_view.xml (+22/-0)
account_banking_sepa_direct_debit/account_payment_view.xml (+26/-0)
account_banking_sepa_direct_debit/company.py (+89/-0)
account_banking_sepa_direct_debit/company_view.xml (+23/-0)
account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml (+21/-0)
account_banking_sepa_direct_debit/data/pain.008.001.02.xsd (+879/-0)
account_banking_sepa_direct_debit/data/pain.008.001.03.xsd (+925/-0)
account_banking_sepa_direct_debit/data/pain.008.001.04.xsd (+892/-0)
account_banking_sepa_direct_debit/data/payment_type_sdd.xml (+37/-0)
account_banking_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot (+633/-0)
account_banking_sepa_direct_debit/i18n/fr.po (+642/-0)
account_banking_sepa_direct_debit/mandate_expire_cron.xml (+26/-0)
account_banking_sepa_direct_debit/res_partner_bank_view.xml (+53/-0)
account_banking_sepa_direct_debit/sdd_mandate_view.xml (+92/-0)
account_banking_sepa_direct_debit/security/ir.model.access.csv (+4/-0)
account_banking_sepa_direct_debit/security/original_mandate_required_security.xml (+17/-0)
account_banking_sepa_direct_debit/wizard/__init__.py (+23/-0)
account_banking_sepa_direct_debit/wizard/export_sdd.py (+450/-0)
account_banking_sepa_direct_debit/wizard/export_sdd_view.xml (+36/-0)
account_direct_debit/model/account_payment.py (+3/-1)
account_direct_debit/view/account_payment.xml (+33/-5)
Text conflict in account_banking/account_banking.py
To merge this branch: bzr merge lp:~akretion-team/banking-addons/61-sepa-direct-debit
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Needs Fixing
Guewen Baconnier @ Camptocamp Approve
Review via email: mp+200020@code.launchpad.net

Description of the change

This is the 6.1 equivalent of my merge on the 7.0 branch.

This branch contains :
- support for SEPA direct debit
- the work I carried out with Luc de Meyer (Noviat) during a code sprint on November 21st to get the additionnal features that were present in Luc's module account_pain for SEPA credit transfer (including the "Initiating Party Issuer", which is required by a few countries including Belgium and structured remittance info)
- the module account_banking_pain_base : this module allows to share as much code as possible between the module for credit transfers and the module for direct debits

P.S. : 38 days left before SEPA migration deadline !

To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hi Alexis,

Is the 7.0 branch this one? https://code.launchpad.net/~akretion-team/banking-addons/70-sepa-direct-debit/+merge/195139
Is the 6.1 branch "work in progress" like the 7.0 one?

Neat piece of work! LGTM so far

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :
review: Approve
191. By Alexis de Lattre

FIX to avoid a crash when adding payment lines via "Select invoices to collect" with date_preferred == fixed
This was caused by a wrong field name : payment.date_planned -> payment.date_scheduled

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

It seems this still needs updating with the results from the review of the 7.0 branch https://code.launchpad.net/~akretion-team/banking-addons/70-sepa-trf-dd-updates/+merge/200019. Otherwise, looks good obviously.

There are some seemingly unrelated changes in account_banking/account_banking.py, but they all look like improvements to me. The changes to exception handling in this file are probably trying to fix the same issue that this branch addresses: https://code.launchpad.net/~therp-nl/banking-addons/6.1-no_unnecessary_raise/+merge/205647.

review: Needs Fixing
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

A month without activity, I set this as WIP

192. By Alexis de Lattre

Add storno field in payment line views.
Add menu entry for payment lines.
Remove readonly=True for storno field, because we may want to set it by hand if we don't have automatic import of bank statements.

Unmerged revisions

192. By Alexis de Lattre

Add storno field in payment line views.
Add menu entry for payment lines.
Remove readonly=True for storno field, because we may want to set it by hand if we don't have automatic import of bank statements.

191. By Alexis de Lattre

FIX to avoid a crash when adding payment lines via "Select invoices to collect" with date_preferred == fixed
This was caused by a wrong field name : payment.date_planned -> payment.date_scheduled

190. By Alexis de Lattre

Backport all SEPA-related modules from current lp:~akretion-team/banking-addons/70-sepa-trf-dd-updates (7.0) to 6.1
Avoid bloacking error message when there is no transfer journal/account on payment mode.

189. By Alexis de Lattre

Add account_banking_sepa_direct_debit, backported to OpenERP 6.1.

188. By Alexis de Lattre

[FIX] Allow offline usage
payment_order_type on payment.order is readonly when not in draft state.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_banking/account_banking.py'
--- account_banking/account_banking.py 2014-02-10 20:13:22 +0000
+++ account_banking/account_banking.py 2014-03-19 00:47:00 +0000
@@ -1057,6 +1057,7 @@
1057 'payment_order_type': fields.selection(1057 'payment_order_type': fields.selection(
1058 [('payment', 'Payment'),('debit', 'Direct debit')],1058 [('payment', 'Payment'),('debit', 'Direct debit')],
1059 'Payment order type', required=True,1059 'Payment order type', required=True,
1060 readonly=True, states={'draft': [('readonly', False)]},
1060 ),1061 ),
1061 'date_sent': fields.date('Send date', readonly=True),1062 'date_sent': fields.date('Send date', readonly=True),
1062 }1063 }
@@ -1510,8 +1511,13 @@
1510 _('The account number appears to be invalid for '1511 _('The account number appears to be invalid for '
1511 '%(country)s')1512 '%(country)s')
1512 % {'country': country.name}1513 % {'country': country.name}
1514<<<<<<< TREE
1513 ))1515 ))
1514 if info is False:1516 if info is False:
1517=======
1518 ))
1519 except:
1520>>>>>>> MERGE-SOURCE
1515 if country.code in sepa.IBAN.countries:1521 if country.code in sepa.IBAN.countries:
1516 acc_number_fmt = sepa.BBAN(acc_number, country.code)1522 acc_number_fmt = sepa.BBAN(acc_number, country.code)
1517 if acc_number_fmt.valid:1523 if acc_number_fmt.valid:
@@ -1576,7 +1582,10 @@
1576 if not bic:1582 if not bic:
1577 return {}1583 return {}
15781584
1579 info, address = sepa.online.bank_info(bic)1585 try:
1586 info, address = sepa.online.bank_info(bic)
1587 except:
1588 return {}
1580 if not info:1589 if not info:
1581 return {}1590 return {}
15821591
15831592
=== modified file 'account_banking/wizard/account_payment_order.py'
--- account_banking/wizard/account_payment_order.py 2013-06-04 21:10:24 +0000
+++ account_banking/wizard/account_payment_order.py 2014-03-19 00:47:00 +0000
@@ -76,9 +76,9 @@
76 elif payment.date_prefered == 'fixed':76 elif payment.date_prefered == 'fixed':
77 ### account_banking77 ### account_banking
78 # date_to_pay = payment.date_planned78 # date_to_pay = payment.date_planned
79 date_to_pay = payment.date_planned and \79 date_to_pay = payment.date_scheduled and \
80 str2date(payment.date_planned) > _today\80 str2date(payment.date_scheduled) > _today\
81 and payment.date_planned or False81 and payment.date_scheduled or False
82 ### end account banking82 ### end account banking
8383
84 ### account_banking84 ### account_banking
8585
=== added directory 'account_banking_pain_base'
=== added file 'account_banking_pain_base/__init__.py'
--- account_banking_pain_base/__init__.py 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/__init__.py 2014-03-19 00:47:00 +0000
@@ -0,0 +1,26 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# PAIN Base module for OpenERP
5# Copyright (C) 2013 Akretion (http://www.akretion.com)
6# @author: Alexis de Lattre <alexis.delattre@akretion.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23from . import payment_line
24from . import payment_mode
25from . import company
26from . import banking_export_pain
027
=== added file 'account_banking_pain_base/__openerp__.py'
--- account_banking_pain_base/__openerp__.py 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/__openerp__.py 2014-03-19 00:47:00 +0000
@@ -0,0 +1,50 @@
1##############################################################################
2#
3# PAIN base module for OpenERP
4# Copyright (C) 2013 Akretion (http://www.akretion.com)
5# @author: Alexis de Lattre <alexis.delattre@akretion.com>
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21{
22 'name': 'Account Banking PAIN Base Module',
23 'summary': 'Base module for PAIN file generation',
24 'version': '0.1',
25 'license': 'AGPL-3',
26 'author': 'Akretion, Noviat',
27 'website': 'http://openerp-community-association.org/',
28 'category': 'Hidden',
29 'depends': ['account_banking'],
30 'external_dependencies': {
31 'python': ['unidecode', 'lxml'],
32 },
33 'data': [
34 'payment_line_view.xml',
35 'payment_mode_view.xml',
36 'company_view.xml',
37 ],
38 'description': '''
39Base module for PAIN file generation
40====================================
41
42This module contains fields and functions that are used by the module for SEPA Credit Transfer (account_banking_sepa_credit_transfer) and SEPA Direct Debit (account_banking_sepa_direct_debit). This module doesn't provide any functionnality by itself.
43
44This module is part of the banking addons: https://launchpad.net/banking-addons
45
46This module was started during the Akretion-Noviat code sprint of November 21st 2013 in Epiais les Louvres (France).
47 ''',
48 'active': False,
49 'installable': True,
50}
051
=== added file 'account_banking_pain_base/banking_export_pain.py'
--- account_banking_pain_base/banking_export_pain.py 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/banking_export_pain.py 2014-03-19 00:47:00 +0000
@@ -0,0 +1,409 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# PAIN Base module for OpenERP
5# Copyright (C) 2013 Akretion (http://www.akretion.com)
6# @author: Alexis de Lattre <alexis.delattre@akretion.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23from openerp.osv import orm
24from openerp.tools.translate import _
25from openerp.tools.safe_eval import safe_eval
26from datetime import datetime
27from unidecode import unidecode
28from lxml import etree
29from openerp import tools
30import logging
31import base64
32
33logger = logging.getLogger(__name__)
34
35
36class banking_export_pain(orm.AbstractModel):
37 _name = 'banking.export.pain'
38
39 def _validate_iban(self, cr, uid, iban, context=None):
40 '''if IBAN is valid, returns IBAN
41 if IBAN is NOT valid, raises an error message'''
42 partner_bank_obj = self.pool.get('res.partner.bank')
43 if partner_bank_obj.is_iban_valid(cr, uid, iban, context=context):
44 return iban.replace(' ', '')
45 else:
46 raise orm.except_orm(
47 _('Error:'), _("This IBAN is not valid : %s") % iban)
48
49 def _prepare_field(
50 self, cr, uid, field_name, field_value, eval_ctx, max_size=0,
51 gen_args=None, context=None):
52 '''This function is designed to be inherited !'''
53 if gen_args is None:
54 gen_args = {}
55 assert isinstance(eval_ctx, dict), 'eval_ctx must contain a dict'
56 try:
57 value = safe_eval(field_value, eval_ctx)
58 # SEPA uses XML ; XML = UTF-8 ; UTF-8 = support for all characters
59 # But we are dealing with banks...
60 # and many banks don't want non-ASCCI characters !
61 # cf section 1.4 "Character set" of the SEPA Credit Transfer
62 # Scheme Customer-to-bank guidelines
63 if gen_args.get('convert_to_ascii'):
64 value = unidecode(value)
65 unallowed_ascii_chars = [
66 '"', '#', '$', '%', '&', '*', ';', '<', '>', '=', '@',
67 '[', ']', '^', '_', '`', '{', '}', '|', '~', '\\', '!']
68 for unallowed_ascii_char in unallowed_ascii_chars:
69 value = value.replace(unallowed_ascii_char, '-')
70 except:
71 line = eval_ctx.get('line')
72 if line:
73 raise orm.except_orm(
74 _('Error:'),
75 _("Cannot compute the '%s' of the Payment Line with "
76 "reference '%s'.")
77 % (field_name, line.name))
78 else:
79 raise orm.except_orm(
80 _('Error:'),
81 _("Cannot compute the '%s'.") % field_name)
82 if not isinstance(value, (str, unicode)):
83 raise orm.except_orm(
84 _('Field type error:'),
85 _("The type of the field '%s' is %s. It should be a string "
86 "or unicode.")
87 % (field_name, type(value)))
88 if not value:
89 raise orm.except_orm(
90 _('Error:'),
91 _("The '%s' is empty or 0. It should have a non-null value.")
92 % field_name)
93 if max_size and len(value) > max_size:
94 value = value[0:max_size]
95 return value
96
97 def _prepare_export_sepa(
98 self, cr, uid, total_amount, transactions_count, xml_string,
99 gen_args, context=None):
100 return {
101 'batch_booking': gen_args['sepa_export'].batch_booking,
102 'charge_bearer': gen_args['sepa_export'].charge_bearer,
103 'total_amount': total_amount,
104 'nb_transactions': transactions_count,
105 'file': base64.encodestring(xml_string),
106 'payment_order_ids': [(
107 6, 0, [x.id for x in gen_args['sepa_export'].payment_order_ids]
108 )],
109 }
110
111 def _validate_xml(self, cr, uid, xml_string, gen_args, context=None):
112 xsd_etree_obj = etree.parse(
113 tools.file_open(gen_args['pain_xsd_file']))
114 official_pain_schema = etree.XMLSchema(xsd_etree_obj)
115
116 try:
117 root_to_validate = etree.fromstring(xml_string)
118 official_pain_schema.assertValid(root_to_validate)
119 except Exception, e:
120 logger.warning(
121 "The XML file is invalid against the XML Schema Definition")
122 logger.warning(xml_string)
123 logger.warning(e)
124 raise orm.except_orm(
125 _('Error:'),
126 _("The generated XML file is not valid against the official "
127 "XML Schema Definition. The generated XML file and the "
128 "full error have been written in the server logs. Here "
129 "is the error, which may give you an idea on the cause "
130 "of the problem : %s")
131 % str(e))
132 return True
133
134 def finalize_sepa_file_creation(
135 self, cr, uid, ids, xml_root, total_amount, transactions_count,
136 gen_args, context=None):
137 xml_string = etree.tostring(
138 xml_root, pretty_print=True, encoding='UTF-8',
139 xml_declaration=True)
140 logger.debug(
141 "Generated SEPA XML file in format %s below"
142 % gen_args['pain_flavor'])
143 logger.debug(xml_string)
144 self._validate_xml(cr, uid, xml_string, gen_args, context=context)
145
146 file_id = gen_args['file_obj'].create(
147 cr, uid, self._prepare_export_sepa(
148 cr, uid, total_amount, transactions_count,
149 xml_string, gen_args, context=context),
150 context=context)
151
152 self.write(
153 cr, uid, ids, {
154 'file_id': file_id,
155 'state': 'finish',
156 }, context=context)
157
158 action = {
159 'name': 'SEPA File',
160 'type': 'ir.actions.act_window',
161 'view_type': 'form',
162 'view_mode': 'form,tree',
163 'res_model': self._name,
164 'res_id': ids[0],
165 'target': 'new',
166 }
167 return action
168
169 def generate_group_header_block(
170 self, cr, uid, parent_node, gen_args, context=None):
171 group_header_1_0 = etree.SubElement(parent_node, 'GrpHdr')
172 message_identification_1_1 = etree.SubElement(
173 group_header_1_0, 'MsgId')
174 message_identification_1_1.text = self._prepare_field(
175 cr, uid, 'Message Identification',
176 'sepa_export.payment_order_ids[0].reference',
177 {'sepa_export': gen_args['sepa_export']}, 35,
178 gen_args=gen_args, context=context)
179 creation_date_time_1_2 = etree.SubElement(group_header_1_0, 'CreDtTm')
180 creation_date_time_1_2.text = datetime.strftime(
181 datetime.today(), '%Y-%m-%dT%H:%M:%S')
182 if gen_args.get('pain_flavor') == 'pain.001.001.02':
183 # batch_booking is in "Group header" with pain.001.001.02
184 # and in "Payment info" in pain.001.001.03/04
185 batch_booking = etree.SubElement(group_header_1_0, 'BtchBookg')
186 batch_booking.text = \
187 str(gen_args['sepa_export'].batch_booking).lower()
188 nb_of_transactions_1_6 = etree.SubElement(
189 group_header_1_0, 'NbOfTxs')
190 control_sum_1_7 = etree.SubElement(group_header_1_0, 'CtrlSum')
191 # Grpg removed in pain.001.001.03
192 if gen_args.get('pain_flavor') == 'pain.001.001.02':
193 grouping = etree.SubElement(group_header_1_0, 'Grpg')
194 grouping.text = 'GRPD'
195 self.generate_initiating_party_block(
196 cr, uid, group_header_1_0, gen_args,
197 context=context)
198 return group_header_1_0, nb_of_transactions_1_6, control_sum_1_7
199
200 def generate_start_payment_info_block(
201 self, cr, uid, parent_node, payment_info_ident,
202 priority, local_instrument, sequence_type, requested_date,
203 eval_ctx, gen_args, context=None):
204 payment_info_2_0 = etree.SubElement(parent_node, 'PmtInf')
205 payment_info_identification_2_1 = etree.SubElement(
206 payment_info_2_0, 'PmtInfId')
207 payment_info_identification_2_1.text = self._prepare_field(
208 cr, uid, 'Payment Information Identification',
209 payment_info_ident, eval_ctx, 35,
210 gen_args=gen_args, context=context)
211 payment_method_2_2 = etree.SubElement(payment_info_2_0, 'PmtMtd')
212 if gen_args.get('pain_flavor').startswith('pain.008.'):
213 payment_method_2_2.text = 'DD'
214 request_date_tag = 'ReqdColltnDt'
215 else:
216 payment_method_2_2.text = 'TRF'
217 request_date_tag = 'ReqdExctnDt'
218 if gen_args.get('pain_flavor') != 'pain.001.001.02':
219 batch_booking_2_3 = etree.SubElement(payment_info_2_0, 'BtchBookg')
220 batch_booking_2_3.text = \
221 str(gen_args['sepa_export'].batch_booking).lower()
222 # The "SEPA Customer-to-bank
223 # Implementation guidelines" for SCT and SDD says that control sum
224 # and nb_of_transactions should be present
225 # at both "group header" level and "payment info" level
226 nb_of_transactions_2_4 = etree.SubElement(
227 payment_info_2_0, 'NbOfTxs')
228 control_sum_2_5 = etree.SubElement(payment_info_2_0, 'CtrlSum')
229 payment_type_info_2_6 = etree.SubElement(
230 payment_info_2_0, 'PmtTpInf')
231 if priority:
232 instruction_priority_2_7 = etree.SubElement(
233 payment_type_info_2_6, 'InstrPrty')
234 instruction_priority_2_7.text = priority
235 service_level_2_8 = etree.SubElement(
236 payment_type_info_2_6, 'SvcLvl')
237 service_level_code_2_9 = etree.SubElement(service_level_2_8, 'Cd')
238 service_level_code_2_9.text = 'SEPA'
239 if local_instrument:
240 local_instrument_2_11 = etree.SubElement(
241 payment_type_info_2_6, 'LclInstrm')
242 local_instr_code_2_12 = etree.SubElement(
243 local_instrument_2_11, 'Cd')
244 local_instr_code_2_12.text = local_instrument
245 if sequence_type:
246 sequence_type_2_14 = etree.SubElement(
247 payment_type_info_2_6, 'SeqTp')
248 sequence_type_2_14.text = sequence_type
249
250 requested_date_2_17 = etree.SubElement(
251 payment_info_2_0, request_date_tag)
252 requested_date_2_17.text = requested_date
253 return payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5
254
255 def generate_initiating_party_block(
256 self, cr, uid, parent_node, gen_args, context=None):
257 my_company_name = self._prepare_field(
258 cr, uid, 'Company Name',
259 'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name',
260 {'sepa_export': gen_args['sepa_export']},
261 gen_args.get('name_maxsize'), gen_args=gen_args, context=context)
262 initiating_party_1_8 = etree.SubElement(parent_node, 'InitgPty')
263 initiating_party_name = etree.SubElement(initiating_party_1_8, 'Nm')
264 initiating_party_name.text = my_company_name
265 initiating_party_identifier = self.pool['res.company'].\
266 _get_initiating_party_identifier(
267 cr, uid,
268 gen_args['sepa_export'].payment_order_ids[0].company_id.id,
269 context=context)
270 initiating_party_issuer = gen_args['sepa_export'].\
271 payment_order_ids[0].company_id.initiating_party_issuer
272 if initiating_party_identifier and initiating_party_issuer:
273 iniparty_id = etree.SubElement(initiating_party_1_8, 'Id')
274 iniparty_org_id = etree.SubElement(iniparty_id, 'OrgId')
275 iniparty_org_other = etree.SubElement(iniparty_org_id, 'Othr')
276 iniparty_org_other_id = etree.SubElement(iniparty_org_other, 'Id')
277 iniparty_org_other_id.text = initiating_party_identifier
278 iniparty_org_other_issuer = etree.SubElement(
279 iniparty_org_other, 'Issr')
280 iniparty_org_other_issuer.text = initiating_party_issuer
281 return True
282
283 def generate_party_bic(
284 self, cr, uid, parent_node, party_type, party_type_label, bic,
285 eval_ctx, gen_args, context=None):
286 '''Generate the piece of the XML file corresponding to BIC
287 This code is mutualized between TRF and DD'''
288 party_agent = etree.SubElement(parent_node, '%sAgt' % party_type)
289 party_agent_institution = etree.SubElement(
290 party_agent, 'FinInstnId')
291 party_agent_bic = etree.SubElement(
292 party_agent_institution, gen_args.get('bic_xml_tag'))
293 party_agent_bic.text = self._prepare_field(
294 cr, uid, '%s BIC' % party_type_label, bic, eval_ctx,
295 gen_args=gen_args, context=context)
296 return True
297
298 def generate_party_block(
299 self, cr, uid, parent_node, party_type, order, name, iban, bic,
300 eval_ctx, gen_args, context=None):
301 '''Generate the piece of the XML file corresponding to Name+IBAN+BIC
302 This code is mutualized between TRF and DD'''
303 assert order in ('B', 'C'), "Order can be 'B' or 'C'"
304 if party_type == 'Cdtr':
305 party_type_label = 'Creditor'
306 elif party_type == 'Dbtr':
307 party_type_label = 'Debtor'
308 # At C level, the order is : BIC, Name, IBAN
309 # At B level, the order is : Name, IBAN, BIC
310 if order == 'C':
311 self.generate_party_bic(
312 cr, uid, parent_node, party_type, party_type_label, bic,
313 eval_ctx, gen_args, context=context)
314 party = etree.SubElement(parent_node, party_type)
315 party_name = etree.SubElement(party, 'Nm')
316 party_name.text = self._prepare_field(
317 cr, uid, '%s Name' % party_type_label, name, eval_ctx,
318 gen_args.get('name_maxsize'),
319 gen_args=gen_args, context=context)
320 party_account = etree.SubElement(
321 parent_node, '%sAcct' % party_type)
322 party_account_id = etree.SubElement(party_account, 'Id')
323 party_account_iban = etree.SubElement(
324 party_account_id, 'IBAN')
325 piban = self._prepare_field(
326 cr, uid, '%s IBAN' % party_type_label, iban, eval_ctx,
327 gen_args=gen_args,
328 context=context)
329 viban = self._validate_iban(cr, uid, piban, context=context)
330 party_account_iban.text = viban
331 if order == 'B':
332 self.generate_party_bic(
333 cr, uid, parent_node, party_type, party_type_label, bic,
334 eval_ctx, gen_args, context=context)
335 return True
336
337 def generate_remittance_info_block(
338 self, cr, uid, parent_node, line, gen_args, context=None):
339
340 remittance_info_2_91 = etree.SubElement(
341 parent_node, 'RmtInf')
342 if line.state == 'normal':
343 remittance_info_unstructured_2_99 = etree.SubElement(
344 remittance_info_2_91, 'Ustrd')
345 remittance_info_unstructured_2_99.text = \
346 self._prepare_field(
347 cr, uid, 'Remittance Unstructured Information',
348 'line.communication', {'line': line}, 140,
349 gen_args=gen_args,
350 context=context)
351 else:
352 if not line.struct_communication_type:
353 raise orm.except_orm(
354 _('Error:'),
355 _("Missing 'Structured Communication Type' on payment "
356 "line with reference '%s'.")
357 % (line.name))
358 remittance_info_unstructured_2_100 = etree.SubElement(
359 remittance_info_2_91, 'Strd')
360 creditor_ref_information_2_120 = etree.SubElement(
361 remittance_info_unstructured_2_100, 'CdtrRefInf')
362 if gen_args.get('pain_flavor') == 'pain.001.001.02':
363 creditor_ref_info_type_2_121 = etree.SubElement(
364 creditor_ref_information_2_120, 'CdtrRefTp')
365 creditor_ref_info_type_code_2_123 = etree.SubElement(
366 creditor_ref_info_type_2_121, 'Cd')
367 creditor_ref_info_type_issuer_2_125 = etree.SubElement(
368 creditor_ref_info_type_2_121, 'Issr')
369 creditor_reference_2_126 = etree.SubElement(
370 creditor_ref_information_2_120, 'CdtrRef')
371 else:
372 creditor_ref_info_type_2_121 = etree.SubElement(
373 creditor_ref_information_2_120, 'Tp')
374 creditor_ref_info_type_or_2_122 = etree.SubElement(
375 creditor_ref_info_type_2_121, 'CdOrPrtry')
376 creditor_ref_info_type_code_2_123 = etree.SubElement(
377 creditor_ref_info_type_or_2_122, 'Cd')
378 creditor_ref_info_type_issuer_2_125 = etree.SubElement(
379 creditor_ref_info_type_2_121, 'Issr')
380 creditor_reference_2_126 = etree.SubElement(
381 creditor_ref_information_2_120, 'Ref')
382
383 creditor_ref_info_type_code_2_123.text = 'SCOR'
384 creditor_ref_info_type_issuer_2_125.text = \
385 line.struct_communication_type
386 creditor_reference_2_126.text = \
387 self._prepare_field(
388 cr, uid, 'Creditor Structured Reference',
389 'line.communication', {'line': line}, 35,
390 gen_args=gen_args,
391 context=context)
392 return True
393
394 def generate_creditor_scheme_identification(
395 self, cr, uid, parent_node, identification, identification_label,
396 eval_ctx, scheme_name_proprietary, gen_args, context=None):
397 csi_id = etree.SubElement(
398 parent_node, 'Id')
399 csi_privateid = csi_id = etree.SubElement(csi_id, 'PrvtId')
400 csi_other = etree.SubElement(csi_privateid, 'Othr')
401 csi_other_id = etree.SubElement(csi_other, 'Id')
402 csi_other_id.text = self._prepare_field(
403 cr, uid, identification_label, identification, eval_ctx,
404 gen_args=gen_args, context=context)
405 csi_scheme_name = etree.SubElement(csi_other, 'SchmeNm')
406 csi_scheme_name_proprietary = etree.SubElement(
407 csi_scheme_name, 'Prtry')
408 csi_scheme_name_proprietary.text = scheme_name_proprietary
409 return True
0410
=== added file 'account_banking_pain_base/company.py'
--- account_banking_pain_base/company.py 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/company.py 2014-03-19 00:47:00 +0000
@@ -0,0 +1,78 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# PAIN Base module for OpenERP
5# Copyright (C) 2013 Akretion (http://www.akretion.com)
6# Copyright (C) 2013 Noviat (http://www.noviat.com)
7# @author: Alexis de Lattre <alexis.delattre@akretion.com>
8# @author: Luc de Meyer (Noviat)
9#
10# This program is free software: you can redistribute it and/or modify
11# it under the terms of the GNU Affero General Public License as
12# published by the Free Software Foundation, either version 3 of the
13# License, or (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU Affero General Public License for more details.
19#
20# You should have received a copy of the GNU Affero General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22#
23##############################################################################
24
25from openerp.osv import orm, fields
26
27
28class res_company(orm.Model):
29 _inherit = 'res.company'
30
31 _columns = {
32 'initiating_party_issuer': fields.char(
33 'Initiating Party Issuer', size=35,
34 help="This will be used as the 'Initiating Party Issuer' in the "
35 "PAIN files generated by OpenERP."),
36 }
37
38 def _get_initiating_party_identifier(
39 self, cr, uid, company_id, context=None):
40 '''The code here may be different from one country to another.
41 If you need to add support for an additionnal country, you can
42 contribute your code here or inherit this function in the
43 localization modules for your country'''
44 assert isinstance(company_id, int), 'Only one company ID'
45 company = self.browse(cr, uid, company_id, context=context)
46 company_vat = company.vat
47 party_identifier = False
48 if company_vat and company_vat[0:2].upper() in ['BE']:
49 party_identifier = company_vat[2:].replace(' ', '')
50 return party_identifier
51
52 def _initiating_party_issuer_default(self, cr, uid, context=None):
53 '''If you need to add support for an additionnal country, you can
54 add an entry in the dict "party_issuer_per_country" here
55 or inherit this function in the localization modules for
56 your country'''
57 initiating_party_issuer = ''
58 # If your country require the 'Initiating Party Issuer', you should
59 # contribute the entry for your country in the dict below
60 party_issuer_per_country = {
61 'BE': 'KBO-BCE', # KBO-BCE = the registry of companies in Belgium
62 }
63 company_id = self._company_default_get(
64 cr, uid, 'res.company', context=context)
65 if company_id:
66 company = self.browse(cr, uid, company_id, context=context)
67 country_code = company.country_id.code
68 initiating_party_issuer = party_issuer_per_country.get(
69 country_code, '')
70 return initiating_party_issuer
71
72 def _initiating_party_issuer_def(self, cr, uid, context=None):
73 return self._initiating_party_issuer_default(
74 cr, uid, context=context)
75
76 _defaults = {
77 'initiating_party_issuer': _initiating_party_issuer_def,
78 }
079
=== added file 'account_banking_pain_base/company_view.xml'
--- account_banking_pain_base/company_view.xml 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/company_view.xml 2014-03-19 00:47:00 +0000
@@ -0,0 +1,24 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2013 Akretion (http://www.akretion.com)
4 @author: Alexis de Lattre <alexis.delattre@akretion.com>
5 The licence is in the file __openerp__.py
6-->
7<openerp>
8<data>
9
10<record id="view_company_form" model="ir.ui.view">
11 <field name="name">pain.group.on.res.company.form</field>
12 <field name="model">res.company</field>
13 <field name="inherit_id" ref="base.view_company_form"/>
14 <field name="arch" type="xml">
15 <field name="currency_id" position="after">
16 <group name="pain" string="Payment Initiation" colspan="2" col="2">
17 <field name="initiating_party_issuer"/>
18 </group>
19 </field>
20 </field>
21</record>
22
23</data>
24</openerp>
025
=== added directory 'account_banking_pain_base/i18n'
=== added file 'account_banking_pain_base/i18n/account_banking_pain_base.pot'
--- account_banking_pain_base/i18n/account_banking_pain_base.pot 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/i18n/account_banking_pain_base.pot 2014-03-19 00:47:00 +0000
@@ -0,0 +1,146 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * account_banking_pain_base
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-12-23 21:26+0000\n"
10"PO-Revision-Date: 2013-12-23 21:26+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: account_banking_pain_base
19#: field:res.company,initiating_party_issuer:0
20msgid "Initiating Party Issuer"
21msgstr ""
22
23#. module: account_banking_pain_base
24#: code:addons/account_banking_pain_base/banking_export_pain.py:122
25#, python-format
26msgid "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"
27msgstr ""
28
29#. module: account_banking_pain_base
30#: field:payment.line,priority:0
31msgid "Priority"
32msgstr ""
33
34#. module: account_banking_pain_base
35#: model:ir.model,name:account_banking_pain_base.model_payment_line
36msgid "Payment Line"
37msgstr ""
38
39#. module: account_banking_pain_base
40#: model:ir.model,name:account_banking_pain_base.model_payment_mode
41msgid "Payment Mode"
42msgstr ""
43
44#. module: account_banking_pain_base
45#: help:res.company,initiating_party_issuer:0
46msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
47msgstr ""
48
49#. module: account_banking_pain_base
50#: code:addons/account_banking_pain_base/banking_export_pain.py:351
51#, python-format
52msgid "Missing 'Structured Communication Type' on payment line with reference '%s'."
53msgstr ""
54
55#. module: account_banking_pain_base
56#: selection:payment.line,priority:0
57msgid "Normal"
58msgstr ""
59
60#. module: account_banking_pain_base
61#: code:addons/account_banking_pain_base/banking_export_pain.py:70
62#, python-format
63msgid "Cannot compute the '%s' of the Payment Line with reference '%s'."
64msgstr ""
65
66#. module: account_banking_pain_base
67#: code:addons/account_banking_pain_base/banking_export_pain.py:77
68#, python-format
69msgid "Cannot compute the '%s'."
70msgstr ""
71
72#. module: account_banking_pain_base
73#: code:addons/account_banking_pain_base/banking_export_pain.py:81
74#, python-format
75msgid "The type of the field '%s' is %s. It should be a string or unicode."
76msgstr ""
77
78#. module: account_banking_pain_base
79#: code:addons/account_banking_pain_base/banking_export_pain.py:47
80#: code:addons/account_banking_pain_base/banking_export_pain.py:69
81#: code:addons/account_banking_pain_base/banking_export_pain.py:76
82#: code:addons/account_banking_pain_base/banking_export_pain.py:86
83#: code:addons/account_banking_pain_base/banking_export_pain.py:121
84#: code:addons/account_banking_pain_base/banking_export_pain.py:350
85#, python-format
86msgid "Error:"
87msgstr ""
88
89#. module: account_banking_pain_base
90#: model:ir.model,name:account_banking_pain_base.model_res_company
91msgid "Companies"
92msgstr ""
93
94#. module: account_banking_pain_base
95#: code:addons/account_banking_pain_base/banking_export_pain.py:47
96#, python-format
97msgid "This IBAN is not valid : %s"
98msgstr ""
99
100#. module: account_banking_pain_base
101#: code:addons/account_banking_pain_base/banking_export_pain.py:80
102#, python-format
103msgid "Field type error:"
104msgstr ""
105
106#. module: account_banking_pain_base
107#: field:payment.line,struct_communication_type:0
108msgid "Structured Communication Type"
109msgstr ""
110
111#. module: account_banking_pain_base
112#: code:addons/account_banking_pain_base/banking_export_pain.py:87
113#, python-format
114msgid "The '%s' is empty or 0. It should have a non-null value."
115msgstr ""
116
117#. module: account_banking_pain_base
118#: model:ir.model,name:account_banking_pain_base.model_banking_export_pain
119msgid "banking.export.pain"
120msgstr ""
121
122#. module: account_banking_pain_base
123#: help:payment.mode,convert_to_ascii:0
124msgid "If active, OpenERP will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file."
125msgstr ""
126
127#. module: account_banking_pain_base
128#: help:payment.line,priority:0
129msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file."
130msgstr ""
131
132#. module: account_banking_pain_base
133#: view:res.company:0
134msgid "Payment Initiation"
135msgstr ""
136
137#. module: account_banking_pain_base
138#: selection:payment.line,priority:0
139msgid "High"
140msgstr ""
141
142#. module: account_banking_pain_base
143#: field:payment.mode,convert_to_ascii:0
144msgid "Convert to ASCII"
145msgstr ""
146
0147
=== added file 'account_banking_pain_base/i18n/fr.po'
--- account_banking_pain_base/i18n/fr.po 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/i18n/fr.po 2014-03-19 00:47:00 +0000
@@ -0,0 +1,146 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * account_banking_pain_base
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-12-23 21:27+0000\n"
10"PO-Revision-Date: 2013-12-23 21:27+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: account_banking_pain_base
19#: field:res.company,initiating_party_issuer:0
20msgid "Initiating Party Issuer"
21msgstr "Initiating Party Issuer"
22
23#. module: account_banking_pain_base
24#: code:addons/account_banking_pain_base/banking_export_pain.py:122
25#, python-format
26msgid "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"
27msgstr "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"
28
29#. module: account_banking_pain_base
30#: field:payment.line,priority:0
31msgid "Priority"
32msgstr "Priorité"
33
34#. module: account_banking_pain_base
35#: model:ir.model,name:account_banking_pain_base.model_payment_line
36msgid "Payment Line"
37msgstr "Ligne de paiement"
38
39#. module: account_banking_pain_base
40#: model:ir.model,name:account_banking_pain_base.model_payment_mode
41msgid "Payment Mode"
42msgstr "Mode de paiement"
43
44#. module: account_banking_pain_base
45#: help:res.company,initiating_party_issuer:0
46msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
47msgstr "Ce champ sera le 'Initiating Party Issuer' dans les fichiers PAIN générés par OpenERP."
48
49#. module: account_banking_pain_base
50#: code:addons/account_banking_pain_base/banking_export_pain.py:351
51#, python-format
52msgid "Missing 'Structured Communication Type' on payment line with reference '%s'."
53msgstr "Le 'Type de communication structuré' n'est pas renseigné sur la ligne de paiement ayant la référence '%s'."
54
55#. module: account_banking_pain_base
56#: selection:payment.line,priority:0
57msgid "Normal"
58msgstr "Normal"
59
60#. module: account_banking_pain_base
61#: code:addons/account_banking_pain_base/banking_export_pain.py:70
62#, python-format
63msgid "Cannot compute the '%s' of the Payment Line with reference '%s'."
64msgstr "Impossible de calculer le '%s' de la ligne de paiement ayant la référence '%s'."
65
66#. module: account_banking_pain_base
67#: code:addons/account_banking_pain_base/banking_export_pain.py:77
68#, python-format
69msgid "Cannot compute the '%s'."
70msgstr "Impossible de calculer le '%s'."
71
72#. module: account_banking_pain_base
73#: code:addons/account_banking_pain_base/banking_export_pain.py:81
74#, python-format
75msgid "The type of the field '%s' is %s. It should be a string or unicode."
76msgstr "Le type du champ '%s' est %s. Il devrait être de type string ou unicode."
77
78#. module: account_banking_pain_base
79#: code:addons/account_banking_pain_base/banking_export_pain.py:47
80#: code:addons/account_banking_pain_base/banking_export_pain.py:69
81#: code:addons/account_banking_pain_base/banking_export_pain.py:76
82#: code:addons/account_banking_pain_base/banking_export_pain.py:86
83#: code:addons/account_banking_pain_base/banking_export_pain.py:121
84#: code:addons/account_banking_pain_base/banking_export_pain.py:350
85#, python-format
86msgid "Error:"
87msgstr "Erreur :"
88
89#. module: account_banking_pain_base
90#: model:ir.model,name:account_banking_pain_base.model_res_company
91msgid "Companies"
92msgstr "Sociétés"
93
94#. module: account_banking_pain_base
95#: code:addons/account_banking_pain_base/banking_export_pain.py:47
96#, python-format
97msgid "This IBAN is not valid : %s"
98msgstr "Cet IBAN n'est pas valide : %s"
99
100#. module: account_banking_pain_base
101#: code:addons/account_banking_pain_base/banking_export_pain.py:80
102#, python-format
103msgid "Field type error:"
104msgstr "Erreur dans le type de champ :"
105
106#. module: account_banking_pain_base
107#: field:payment.line,struct_communication_type:0
108msgid "Structured Communication Type"
109msgstr "Type de communication structurée"
110
111#. module: account_banking_pain_base
112#: code:addons/account_banking_pain_base/banking_export_pain.py:87
113#, python-format
114msgid "The '%s' is empty or 0. It should have a non-null value."
115msgstr "Le '%s' est vide ou égal à 0. Il devrait avoir une valeur non-nulle."
116
117#. module: account_banking_pain_base
118#: model:ir.model,name:account_banking_pain_base.model_banking_export_pain
119msgid "banking.export.pain"
120msgstr "banking.export.pain"
121
122#. module: account_banking_pain_base
123#: help:payment.mode,convert_to_ascii:0
124msgid "If active, OpenERP will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file."
125msgstr "Si actif, OpenERP convertira chaque caractère accentué en son équivalent non accentué, de telle façon que seuls des caractères ASCII soient utilisés dans le fichier PAIN généré."
126
127#. module: account_banking_pain_base
128#: help:payment.line,priority:0
129msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file."
130msgstr "Ce champ sera le 'Instruction Priority' dans le fichier PAIN généré."
131
132#. module: account_banking_pain_base
133#: view:res.company:0
134msgid "Payment Initiation"
135msgstr "Payment Initiation"
136
137#. module: account_banking_pain_base
138#: selection:payment.line,priority:0
139msgid "High"
140msgstr "Élevé"
141
142#. module: account_banking_pain_base
143#: field:payment.mode,convert_to_ascii:0
144msgid "Convert to ASCII"
145msgstr "Convertir en ASCII"
146
0147
=== added file 'account_banking_pain_base/payment_line.py'
--- account_banking_pain_base/payment_line.py 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/payment_line.py 2014-03-19 00:47:00 +0000
@@ -0,0 +1,52 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# PAIN Base module for OpenERP
5# Copyright (C) 2013 Akretion (http://www.akretion.com)
6# @author: Alexis de Lattre <alexis.delattre@akretion.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23from openerp.osv import orm, fields
24
25
26class payment_line(orm.Model):
27 _inherit = 'payment.line'
28
29 def _get_struct_communication_types(self, cr, uid, context=None):
30 return [('ISO', 'ISO')]
31
32 _columns = {
33 'priority': fields.selection([
34 ('NORM', 'Normal'),
35 ('HIGH', 'High'),
36 ], 'Priority',
37 help="This field will be used as the 'Instruction Priority' in "
38 "the generated PAIN file."),
39 # Update size from 64 to 140, because PAIN allows 140 caracters
40 'communication': fields.char(
41 'Communication', size=140, required=True,
42 help="Used as the message between ordering customer and current "
43 "company. Depicts 'What do you want to say to the recipient "
44 "about this order ?'"),
45 'struct_communication_type': fields.selection(
46 _get_struct_communication_types, 'Structured Communication Type'),
47 }
48
49 _defaults = {
50 'priority': 'NORM',
51 'struct_communication_type': 'ISO',
52 }
053
=== added file 'account_banking_pain_base/payment_line_view.xml'
--- account_banking_pain_base/payment_line_view.xml 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/payment_line_view.xml 2014-03-19 00:47:00 +0000
@@ -0,0 +1,43 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2013 Akretion (http://www.akretion.com)
4 @author: Alexis de Lattre <alexis.delattre@akretion.com>
5 The licence is in the file __openerp__.py
6-->
7<openerp>
8<data>
9
10<record id="view_payment_line_form" model="ir.ui.view">
11 <field name="name">pain.base.payment.line.form</field>
12 <field name="model">payment.line</field>
13 <field name="inherit_id" ref="account_payment.view_payment_line_form"/>
14 <field name="arch" type="xml">
15 <field name="bank_id" position="after">
16 <field name="priority"/>
17 <newline />
18 </field>
19 <field name="communication2" position="replace"/>
20 <field name="state" position="after">
21 <field name="struct_communication_type" attrs="{'invisible': [('state', '!=', 'structured')], 'required': [('state', '=', 'structured')]}"/>
22 </field>
23 </field>
24</record>
25
26<record id="view_payment_order_form" model="ir.ui.view">
27 <field name="name">pain.base.payment.line.inside.order.form</field>
28 <field name="model">payment.order</field>
29 <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
30 <field name="arch" type="xml">
31 <xpath expr="//field[@name='line_ids']/form//field[@name='bank_id']" position="after">
32 <field name="priority"/>
33 <newline />
34 </xpath>
35 <xpath expr="//field[@name='line_ids']/form//field[@name='communication2']" position="replace"/>
36 <xpath expr="//field[@name='line_ids']/form//field[@name='state']" position="after">
37 <field name="struct_communication_type" attrs="{'invisible': [('state', '!=', 'structured')], 'required': [('state', '=', 'structured')]}"/>
38 </xpath>
39 </field>
40</record>
41
42</data>
43</openerp>
044
=== added file 'account_banking_pain_base/payment_mode.py'
--- account_banking_pain_base/payment_mode.py 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/payment_mode.py 2014-03-19 00:47:00 +0000
@@ -0,0 +1,39 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# PAIN Base module for OpenERP
5# Copyright (C) 2013 Akretion (http://www.akretion.com)
6# @author: Alexis de Lattre <alexis.delattre@akretion.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23from openerp.osv import orm, fields
24
25
26class payment_mode(orm.Model):
27 _inherit = 'payment.mode'
28
29 _columns = {
30 'convert_to_ascii': fields.boolean(
31 'Convert to ASCII',
32 help="If active, OpenERP will convert each accented caracter to "
33 "the corresponding unaccented caracter, so that only ASCII "
34 "caracters are used in the generated PAIN file."),
35 }
36
37 _defaults = {
38 'convert_to_ascii': True,
39 }
040
=== added file 'account_banking_pain_base/payment_mode_view.xml'
--- account_banking_pain_base/payment_mode_view.xml 1970-01-01 00:00:00 +0000
+++ account_banking_pain_base/payment_mode_view.xml 2014-03-19 00:47:00 +0000
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2013 Akretion (http://www.akretion.com)
4 @author: Alexis de Lattre <alexis.delattre@akretion.com>
5 The licence is in the file __openerp__.py
6-->
7<openerp>
8<data>
9
10<record id="view_payment_mode_form_inherit" model="ir.ui.view">
11 <field name="name">add.convert_to_ascii.in.payment.mode.form</field>
12 <field name="model">payment.mode</field>
13 <field name="inherit_id" ref="account_banking.view_payment_mode_form_inherit"/>
14 <field name="arch" type="xml">
15 <field name="type" position="after">
16 <field name="convert_to_ascii"/>
17 </field>
18 </field>
19</record>
20
21</data>
22</openerp>
023
=== modified file 'account_banking_sepa_credit_transfer/__init__.py'
--- account_banking_sepa_credit_transfer/__init__.py 2013-05-15 20:09:21 +0000
+++ account_banking_sepa_credit_transfer/__init__.py 2014-03-19 00:47:00 +0000
@@ -20,6 +20,5 @@
20#20#
21##############################################################################21##############################################################################
2222
23import wizard23from . import wizard
24import account_banking_sepa24from . import account_banking_sepa
25
2625
=== modified file 'account_banking_sepa_credit_transfer/__openerp__.py'
--- account_banking_sepa_credit_transfer/__openerp__.py 2013-09-22 19:51:06 +0000
+++ account_banking_sepa_credit_transfer/__openerp__.py 2014-03-19 00:47:00 +0000
@@ -21,24 +21,25 @@
21{21{
22 'name': 'Account Banking SEPA Credit Transfer',22 'name': 'Account Banking SEPA Credit Transfer',
23 'summary': 'Create SEPA XML files for Credit Transfers',23 'summary': 'Create SEPA XML files for Credit Transfers',
24 'version': '0.1',24 'version': '0.2',
25 'license': 'AGPL-3',25 'license': 'AGPL-3',
26 'author': 'Akretion',26 'author': 'Akretion',
27 'website': 'http://www.akretion.com',27 'website': 'http://www.akretion.com',
28 'category': 'Banking addons',28 'category': 'Banking addons',
29 'depends': ['account_banking'],29 'depends': ['account_banking_pain_base'],
30 'init_xml': [],30 'external_dependencies': {
31 'update_xml': [31 'python': ['unidecode', 'lxml'],
32 },
33 'data': [
32 'account_banking_sepa_view.xml',34 'account_banking_sepa_view.xml',
33 'wizard/export_sepa_view.xml',35 'wizard/export_sepa_view.xml',
34 'data/payment_type_sepa_sct.xml',36 'data/payment_type_sepa_sct.xml',
35 'security/ir.model.access.csv',37 'security/ir.model.access.csv',
36 ],38 ],
37 'demo_xml': [],
38 'description': '''39 'description': '''
39Module to export payment orders in SEPA XML file format.40Module to export payment orders in SEPA XML file format.
4041
41SEPA PAIN (PAyment INitiation) is the new european standard for Customer-to-Bank payment instructions. This module implements SEPA Credit Transfer (SCT), more specifically PAIN versions 001.001.02, 001.001.03 and 001.001.04. It is part of the ISO 20022 standard, available on http://www.iso20022.org.42SEPA PAIN (PAyment INitiation) is the new european standard for Customer-to-Bank payment instructions. This module implements SEPA Credit Transfer (SCT), more specifically PAIN versions 001.001.02, 001.001.03, 001.001.04 and 001.001.05. It is part of the ISO 20022 standard, available on http://www.iso20022.org.
4243
43The Implementation Guidelines for SEPA Credit Transfer published by the European Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN version 001.001.03, so it's probably the version of PAIN that you should try first.44The Implementation Guidelines for SEPA Credit Transfer published by the European Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN version 001.001.03, so it's probably the version of PAIN that you should try first.
4445
@@ -48,4 +49,5 @@
48 ''',49 ''',
49 'active': False,50 'active': False,
50 'installable': True,51 'installable': True,
52 'application': True,
51}53}
5254
=== modified file 'account_banking_sepa_credit_transfer/account_banking_sepa.py'
--- account_banking_sepa_credit_transfer/account_banking_sepa.py 2013-05-22 21:07:52 +0000
+++ account_banking_sepa_credit_transfer/account_banking_sepa.py 2014-03-19 00:47:00 +0000
@@ -19,22 +19,26 @@
19#19#
20##############################################################################20##############################################################################
2121
22from osv import osv, fields22from openerp.osv import orm, fields
23import time
24from tools.translate import _
25import decimal_precision as dp23import decimal_precision as dp
2624from unidecode import unidecode
2725
28class banking_export_sepa(osv.osv):26
27class banking_export_sepa(orm.Model):
29 '''SEPA export'''28 '''SEPA export'''
30 _name = 'banking.export.sepa'29 _name = 'banking.export.sepa'
31 _description = __doc__30 _description = __doc__
32 _rec_name = 'msg_identification'31 _rec_name = 'filename'
3332
34 def _generate_filename(self, cr, uid, ids, name, arg, context=None):33 def _generate_filename(self, cr, uid, ids, name, arg, context=None):
35 res = {}34 res = {}
36 for sepa_file in self.browse(cr, uid, ids, context=context):35 for sepa_file in self.browse(cr, uid, ids, context=context):
37 res[sepa_file.id] = 'sepa_' + (sepa_file.msg_identification or '') + '.xml'36 ref = sepa_file.payment_order_ids[0].reference
37 if ref:
38 label = unidecode(ref.replace('/', '-'))
39 else:
40 label = 'error'
41 res[sepa_file.id] = 'sct_%s.xml' % label
38 return res42 return res
3943
40 _columns = {44 _columns = {
@@ -42,39 +46,45 @@
42 'payment.order',46 'payment.order',
43 'account_payment_order_sepa_rel',47 'account_payment_order_sepa_rel',
44 'banking_export_sepa_id', 'account_order_id',48 'banking_export_sepa_id', 'account_order_id',
45 'Payment orders',49 'Payment Orders',
46 readonly=True),50 readonly=True),
47 'prefered_exec_date': fields.date('Prefered execution date', readonly=True),51 'nb_transactions': fields.integer(
48 'nb_transactions': fields.integer('Number of transactions', readonly=True),52 'Number of Transactions', readonly=True),
49 'total_amount': fields.float('Total amount',53 'total_amount': fields.float(
50 digits_compute=dp.get_precision('Account'), readonly=True),54 'Total Amount', digits_compute=dp.get_precision('Account'),
51 'msg_identification': fields.char('Message identification', size=35,55 readonly=True),
52 readonly=True),56 'batch_booking': fields.boolean(
53 'batch_booking': fields.boolean('Batch booking', readonly=True,57 'Batch Booking', readonly=True,
54 help="If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file."),58 help="If true, the bank statement will display only one debit "
59 "line for all the wire transfers of the SEPA XML file ; "
60 "if false, the bank statement will display one debit line "
61 "per wire transfer of the SEPA XML file."),
55 'charge_bearer': fields.selection([62 'charge_bearer': fields.selection([
63 ('SLEV', 'Following Service Level'),
56 ('SHAR', 'Shared'),64 ('SHAR', 'Shared'),
57 ('CRED', 'Borne by creditor'),65 ('CRED', 'Borne by Creditor'),
58 ('DEBT', 'Borne by debtor'),66 ('DEBT', 'Borne by Debtor'),
59 ('SLEV', 'Following service level'),67 ], 'Charge Bearer', readonly=True,
60 ], 'Charge bearer', readonly=True,68 help="Following service level : transaction charges are to be "
61 help='Shared : transaction charges on the sender side are to be borne by the debtor, transaction charges on the receiver side are to be borne by the creditor (most transfers use this). Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor. Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme.'),69 "applied following the rules agreed in the service level and/or "
62 'generation_date': fields.datetime('Generation date',70 "scheme (SEPA Core messages must use this). Shared : "
71 "transaction charges on the creditor side are to be borne by "
72 "the creditor, transaction charges on the debtor side are to "
73 "be borne by the debtor. Borne by creditor : all transaction "
74 "charges are to be borne by the creditor. Borne by debtor : "
75 "all transaction charges are to be borne by the debtor."),
76 'create_date': fields.datetime('Generation Date', readonly=True),
77 'file': fields.binary('SEPA XML File', readonly=True),
78 'filename': fields.function(
79 _generate_filename, type='char', size=256, string='Filename',
63 readonly=True),80 readonly=True),
64 'file': fields.binary('SEPA XML file', readonly=True),
65 'filename': fields.function(_generate_filename, type='char', size=256,
66 method=True, string='Filename', readonly=True),
67 'state': fields.selection([81 'state': fields.selection([
68 ('draft', 'Draft'),82 ('draft', 'Draft'),
69 ('sent', 'Sent'),83 ('sent', 'Sent'),
70 ('done', 'Reconciled'),84 ('done', 'Reconciled'),
71 ], 'State', readonly=True),85 ], 'State', readonly=True),
72 }86 }
7387
74 _defaults = {88 _defaults = {
75 'generation_date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
76 'state': 'draft',89 'state': 'draft',
77 }90 }
78
79banking_export_sepa()
80
8191
=== modified file 'account_banking_sepa_credit_transfer/account_banking_sepa_view.xml'
--- account_banking_sepa_credit_transfer/account_banking_sepa_view.xml 2013-09-22 19:51:06 +0000
+++ account_banking_sepa_credit_transfer/account_banking_sepa_view.xml 2014-03-19 00:47:00 +0000
@@ -15,20 +15,18 @@
15 <form string="SEPA Credit Transfer">15 <form string="SEPA Credit Transfer">
16 <notebook>16 <notebook>
17 <page string="General Information">17 <page string="General Information">
18 <field name="msg_identification" select="1" />
19 <field name="total_amount" />18 <field name="total_amount" />
20 <field name="nb_transactions" />19 <field name="nb_transactions" />
21 <field name="prefered_exec_date" />
22 <field name="batch_booking" />20 <field name="batch_booking" />
23 <field name="charge_bearer"/>21 <field name="charge_bearer"/>
24 <field name="generation_date" />22 <field name="create_date" />
25 <newline />23 <newline />
26 <field name="file" filename="filename"/>24 <field name="file" filename="filename"/>
27 <field name="filename" invisible="True"/>25 <field name="filename" invisible="True"/>
28 </page>26 </page>
29 <page string="Payment Orders">27 <page string="Payment Orders">
30 <field name="payment_order_ids" colspan="4" nolabel="1">28 <field name="payment_order_ids" colspan="4" nolabel="1">
31 <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment order">29 <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment Orders">
32 <field name="reference"/>30 <field name="reference"/>
33 <field name="date_created"/>31 <field name="date_created"/>
34 <field name="date_done"/>32 <field name="date_done"/>
@@ -49,9 +47,8 @@
49 <field name="type">tree</field>47 <field name="type">tree</field>
50 <field name="arch" type="xml">48 <field name="arch" type="xml">
51 <tree string="SEPA Credit Transfer">49 <tree string="SEPA Credit Transfer">
52 <field name="msg_identification"/>50 <field name="filename"/>
53 <field name="prefered_exec_date"/>51 <field name="create_date"/>
54 <field name="generation_date"/>
55 <field name="nb_transactions"/>52 <field name="nb_transactions"/>
56 </tree>53 </tree>
57 </field>54 </field>
@@ -59,7 +56,7 @@
5956
6057
61<record id="action_account_banking_sepa" model="ir.actions.act_window">58<record id="action_account_banking_sepa" model="ir.actions.act_window">
62 <field name="name">Generated SEPA Credit Transfer XML files</field>59 <field name="name">SEPA Credit Transfer Files</field>
63 <field name="res_model">banking.export.sepa</field>60 <field name="res_model">banking.export.sepa</field>
64 <field name="view_type">form</field>61 <field name="view_type">form</field>
65 <field name="view_mode">tree,form</field>62 <field name="view_mode">tree,form</field>
@@ -67,13 +64,13 @@
6764
6865
69<menuitem id="menu_account_banking_sepa"66<menuitem id="menu_account_banking_sepa"
70 parent="account_banking.menu_finance_banking_actions"67 parent="account_payment.menu_main_payment"
71 action="action_account_banking_sepa"68 action="action_account_banking_sepa"
72 sequence="15"69 sequence="15"
73 />70 />
7471
75<act_window id="act_banking_export_sepa_payment_order"72<act_window id="act_banking_export_sepa_payment_order"
76 name="Generated SEPA Credit Transfer files"73 name="SEPA Credit Transfer Files"
77 domain="[('payment_order_ids', '=', active_id)]"74 domain="[('payment_order_ids', '=', active_id)]"
78 res_model="banking.export.sepa"75 res_model="banking.export.sepa"
79 src_model="payment.order"76 src_model="payment.order"
8077
=== added file 'account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd'
--- account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd 1970-01-01 00:00:00 +0000
+++ account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd 2014-03-19 00:47:00 +0000
@@ -0,0 +1,931 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!--Generated by Standards Editor (build:R1.0.41.3) on 2013 Mar 05 13:39:40, ISO 20022 version : 2013-->
3<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.05" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.05">
4 <xs:element name="Document" type="Document"/>
5 <xs:complexType name="AccountIdentification4Choice">
6 <xs:choice>
7 <xs:element name="IBAN" type="IBAN2007Identifier"/>
8 <xs:element name="Othr" type="GenericAccountIdentification1"/>
9 </xs:choice>
10 </xs:complexType>
11 <xs:complexType name="AccountSchemeName1Choice">
12 <xs:choice>
13 <xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
14 <xs:element name="Prtry" type="Max35Text"/>
15 </xs:choice>
16 </xs:complexType>
17 <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
18 <xs:restriction base="xs:decimal">
19 <xs:fractionDigits value="5"/>
20 <xs:totalDigits value="18"/>
21 <xs:minInclusive value="0"/>
22 </xs:restriction>
23 </xs:simpleType>
24 <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
25 <xs:simpleContent>
26 <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
27 <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
28 </xs:extension>
29 </xs:simpleContent>
30 </xs:complexType>
31 <xs:simpleType name="ActiveOrHistoricCurrencyCode">
32 <xs:restriction base="xs:string">
33 <xs:pattern value="[A-Z]{3,3}"/>
34 </xs:restriction>
35 </xs:simpleType>
36 <xs:simpleType name="AddressType2Code">
37 <xs:restriction base="xs:string">
38 <xs:enumeration value="ADDR"/>
39 <xs:enumeration value="PBOX"/>
40 <xs:enumeration value="HOME"/>
41 <xs:enumeration value="BIZZ"/>
42 <xs:enumeration value="MLTO"/>
43 <xs:enumeration value="DLVY"/>
44 </xs:restriction>
45 </xs:simpleType>
46 <xs:complexType name="AmountType3Choice">
47 <xs:choice>
48 <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
49 <xs:element name="EqvtAmt" type="EquivalentAmount2"/>
50 </xs:choice>
51 </xs:complexType>
52 <xs:simpleType name="AnyBICIdentifier">
53 <xs:restriction base="xs:string">
54 <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
55 </xs:restriction>
56 </xs:simpleType>
57 <xs:complexType name="Authorisation1Choice">
58 <xs:choice>
59 <xs:element name="Cd" type="Authorisation1Code"/>
60 <xs:element name="Prtry" type="Max128Text"/>
61 </xs:choice>
62 </xs:complexType>
63 <xs:simpleType name="Authorisation1Code">
64 <xs:restriction base="xs:string">
65 <xs:enumeration value="AUTH"/>
66 <xs:enumeration value="FDET"/>
67 <xs:enumeration value="FSUM"/>
68 <xs:enumeration value="ILEV"/>
69 </xs:restriction>
70 </xs:simpleType>
71 <xs:simpleType name="BICFIIdentifier">
72 <xs:restriction base="xs:string">
73 <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
74 </xs:restriction>
75 </xs:simpleType>
76 <xs:simpleType name="BaseOneRate">
77 <xs:restriction base="xs:decimal">
78 <xs:fractionDigits value="10"/>
79 <xs:totalDigits value="11"/>
80 </xs:restriction>
81 </xs:simpleType>
82 <xs:simpleType name="BatchBookingIndicator">
83 <xs:restriction base="xs:boolean"/>
84 </xs:simpleType>
85 <xs:complexType name="BranchAndFinancialInstitutionIdentification5">
86 <xs:sequence>
87 <xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/>
88 <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
89 </xs:sequence>
90 </xs:complexType>
91 <xs:complexType name="BranchData2">
92 <xs:sequence>
93 <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
94 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
95 <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
96 </xs:sequence>
97 </xs:complexType>
98 <xs:complexType name="CashAccount24">
99 <xs:sequence>
100 <xs:element name="Id" type="AccountIdentification4Choice"/>
101 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/>
102 <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
103 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
104 </xs:sequence>
105 </xs:complexType>
106 <xs:complexType name="CashAccountType2Choice">
107 <xs:choice>
108 <xs:element name="Cd" type="ExternalCashAccountType1Code"/>
109 <xs:element name="Prtry" type="Max35Text"/>
110 </xs:choice>
111 </xs:complexType>
112 <xs:complexType name="CategoryPurpose1Choice">
113 <xs:choice>
114 <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
115 <xs:element name="Prtry" type="Max35Text"/>
116 </xs:choice>
117 </xs:complexType>
118 <xs:simpleType name="ChargeBearerType1Code">
119 <xs:restriction base="xs:string">
120 <xs:enumeration value="DEBT"/>
121 <xs:enumeration value="CRED"/>
122 <xs:enumeration value="SHAR"/>
123 <xs:enumeration value="SLEV"/>
124 </xs:restriction>
125 </xs:simpleType>
126 <xs:complexType name="Cheque7">
127 <xs:sequence>
128 <xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
129 <xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
130 <xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
131 <xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
132 <xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
133 <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
134 <xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
135 <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
136 <xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
137 <xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
138 <xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
139 <xs:element maxOccurs="5" minOccurs="0" name="Sgntr" type="Max70Text"/>
140 </xs:sequence>
141 </xs:complexType>
142 <xs:simpleType name="ChequeDelivery1Code">
143 <xs:restriction base="xs:string">
144 <xs:enumeration value="MLDB"/>
145 <xs:enumeration value="MLCD"/>
146 <xs:enumeration value="MLFA"/>
147 <xs:enumeration value="CRDB"/>
148 <xs:enumeration value="CRCD"/>
149 <xs:enumeration value="CRFA"/>
150 <xs:enumeration value="PUDB"/>
151 <xs:enumeration value="PUCD"/>
152 <xs:enumeration value="PUFA"/>
153 <xs:enumeration value="RGDB"/>
154 <xs:enumeration value="RGCD"/>
155 <xs:enumeration value="RGFA"/>
156 </xs:restriction>
157 </xs:simpleType>
158 <xs:complexType name="ChequeDeliveryMethod1Choice">
159 <xs:choice>
160 <xs:element name="Cd" type="ChequeDelivery1Code"/>
161 <xs:element name="Prtry" type="Max35Text"/>
162 </xs:choice>
163 </xs:complexType>
164 <xs:simpleType name="ChequeType2Code">
165 <xs:restriction base="xs:string">
166 <xs:enumeration value="CCHQ"/>
167 <xs:enumeration value="CCCH"/>
168 <xs:enumeration value="BCHQ"/>
169 <xs:enumeration value="DRFT"/>
170 <xs:enumeration value="ELDR"/>
171 </xs:restriction>
172 </xs:simpleType>
173 <xs:complexType name="ClearingSystemIdentification2Choice">
174 <xs:choice>
175 <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
176 <xs:element name="Prtry" type="Max35Text"/>
177 </xs:choice>
178 </xs:complexType>
179 <xs:complexType name="ClearingSystemMemberIdentification2">
180 <xs:sequence>
181 <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
182 <xs:element name="MmbId" type="Max35Text"/>
183 </xs:sequence>
184 </xs:complexType>
185 <xs:complexType name="ContactDetails2">
186 <xs:sequence>
187 <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
188 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
189 <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
190 <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
191 <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
192 <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
193 <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
194 </xs:sequence>
195 </xs:complexType>
196 <xs:simpleType name="CountryCode">
197 <xs:restriction base="xs:string">
198 <xs:pattern value="[A-Z]{2,2}"/>
199 </xs:restriction>
200 </xs:simpleType>
201 <xs:simpleType name="CreditDebitCode">
202 <xs:restriction base="xs:string">
203 <xs:enumeration value="CRDT"/>
204 <xs:enumeration value="DBIT"/>
205 </xs:restriction>
206 </xs:simpleType>
207 <xs:complexType name="CreditTransferTransaction6">
208 <xs:sequence>
209 <xs:element name="PmtId" type="PaymentIdentification1"/>
210 <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
211 <xs:element name="Amt" type="AmountType3Choice"/>
212 <xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRate1"/>
213 <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
214 <xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque7"/>
215 <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
216 <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification5"/>
217 <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount24"/>
218 <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification5"/>
219 <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount24"/>
220 <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification5"/>
221 <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount24"/>
222 <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
223 <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
224 <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification43"/>
225 <xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount24"/>
226 <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
227 <xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
228 <xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
229 <xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
230 <xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
231 <xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
232 <xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
233 <xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation7"/>
234 <xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
235 </xs:sequence>
236 </xs:complexType>
237 <xs:complexType name="CreditorReferenceInformation2">
238 <xs:sequence>
239 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
240 <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
241 </xs:sequence>
242 </xs:complexType>
243 <xs:complexType name="CreditorReferenceType1Choice">
244 <xs:choice>
245 <xs:element name="Cd" type="DocumentType3Code"/>
246 <xs:element name="Prtry" type="Max35Text"/>
247 </xs:choice>
248 </xs:complexType>
249 <xs:complexType name="CreditorReferenceType2">
250 <xs:sequence>
251 <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
252 <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
253 </xs:sequence>
254 </xs:complexType>
255 <xs:complexType name="CustomerCreditTransferInitiationV05">
256 <xs:sequence>
257 <xs:element name="GrpHdr" type="GroupHeader48"/>
258 <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstruction9"/>
259 <xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
260 </xs:sequence>
261 </xs:complexType>
262 <xs:complexType name="DateAndPlaceOfBirth">
263 <xs:sequence>
264 <xs:element name="BirthDt" type="ISODate"/>
265 <xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
266 <xs:element name="CityOfBirth" type="Max35Text"/>
267 <xs:element name="CtryOfBirth" type="CountryCode"/>
268 </xs:sequence>
269 </xs:complexType>
270 <xs:complexType name="DatePeriodDetails">
271 <xs:sequence>
272 <xs:element name="FrDt" type="ISODate"/>
273 <xs:element name="ToDt" type="ISODate"/>
274 </xs:sequence>
275 </xs:complexType>
276 <xs:simpleType name="DecimalNumber">
277 <xs:restriction base="xs:decimal">
278 <xs:fractionDigits value="17"/>
279 <xs:totalDigits value="18"/>
280 </xs:restriction>
281 </xs:simpleType>
282 <xs:complexType name="DiscountAmountAndType1">
283 <xs:sequence>
284 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/>
285 <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
286 </xs:sequence>
287 </xs:complexType>
288 <xs:complexType name="DiscountAmountType1Choice">
289 <xs:choice>
290 <xs:element name="Cd" type="ExternalDiscountAmountType1Code"/>
291 <xs:element name="Prtry" type="Max35Text"/>
292 </xs:choice>
293 </xs:complexType>
294 <xs:complexType name="Document">
295 <xs:sequence>
296 <xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV05"/>
297 </xs:sequence>
298 </xs:complexType>
299 <xs:complexType name="DocumentAdjustment1">
300 <xs:sequence>
301 <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
302 <xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
303 <xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
304 <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
305 </xs:sequence>
306 </xs:complexType>
307 <xs:simpleType name="DocumentType3Code">
308 <xs:restriction base="xs:string">
309 <xs:enumeration value="RADM"/>
310 <xs:enumeration value="RPIN"/>
311 <xs:enumeration value="FXDR"/>
312 <xs:enumeration value="DISP"/>
313 <xs:enumeration value="PUOR"/>
314 <xs:enumeration value="SCOR"/>
315 </xs:restriction>
316 </xs:simpleType>
317 <xs:simpleType name="DocumentType5Code">
318 <xs:restriction base="xs:string">
319 <xs:enumeration value="MSIN"/>
320 <xs:enumeration value="CNFA"/>
321 <xs:enumeration value="DNFA"/>
322 <xs:enumeration value="CINV"/>
323 <xs:enumeration value="CREN"/>
324 <xs:enumeration value="DEBN"/>
325 <xs:enumeration value="HIRI"/>
326 <xs:enumeration value="SBIN"/>
327 <xs:enumeration value="CMCN"/>
328 <xs:enumeration value="SOAC"/>
329 <xs:enumeration value="DISP"/>
330 <xs:enumeration value="BOLD"/>
331 <xs:enumeration value="VCHR"/>
332 <xs:enumeration value="AROI"/>
333 <xs:enumeration value="TSUT"/>
334 </xs:restriction>
335 </xs:simpleType>
336 <xs:complexType name="EquivalentAmount2">
337 <xs:sequence>
338 <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
339 <xs:element name="CcyOfTrf" type="ActiveOrHistoricCurrencyCode"/>
340 </xs:sequence>
341 </xs:complexType>
342 <xs:complexType name="ExchangeRate1">
343 <xs:sequence>
344 <xs:element maxOccurs="1" minOccurs="0" name="UnitCcy" type="ActiveOrHistoricCurrencyCode"/>
345 <xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
346 <xs:element maxOccurs="1" minOccurs="0" name="RateTp" type="ExchangeRateType1Code"/>
347 <xs:element maxOccurs="1" minOccurs="0" name="CtrctId" type="Max35Text"/>
348 </xs:sequence>
349 </xs:complexType>
350 <xs:simpleType name="ExchangeRateType1Code">
351 <xs:restriction base="xs:string">
352 <xs:enumeration value="SPOT"/>
353 <xs:enumeration value="SALE"/>
354 <xs:enumeration value="AGRD"/>
355 </xs:restriction>
356 </xs:simpleType>
357 <xs:simpleType name="ExternalAccountIdentification1Code">
358 <xs:restriction base="xs:string">
359 <xs:minLength value="1"/>
360 <xs:maxLength value="4"/>
361 </xs:restriction>
362 </xs:simpleType>
363 <xs:simpleType name="ExternalCashAccountType1Code">
364 <xs:restriction base="xs:string">
365 <xs:minLength value="1"/>
366 <xs:maxLength value="4"/>
367 </xs:restriction>
368 </xs:simpleType>
369 <xs:simpleType name="ExternalCategoryPurpose1Code">
370 <xs:restriction base="xs:string">
371 <xs:minLength value="1"/>
372 <xs:maxLength value="4"/>
373 </xs:restriction>
374 </xs:simpleType>
375 <xs:simpleType name="ExternalClearingSystemIdentification1Code">
376 <xs:restriction base="xs:string">
377 <xs:minLength value="1"/>
378 <xs:maxLength value="5"/>
379 </xs:restriction>
380 </xs:simpleType>
381 <xs:simpleType name="ExternalDiscountAmountType1Code">
382 <xs:restriction base="xs:string">
383 <xs:minLength value="1"/>
384 <xs:maxLength value="4"/>
385 </xs:restriction>
386 </xs:simpleType>
387 <xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
388 <xs:restriction base="xs:string">
389 <xs:minLength value="1"/>
390 <xs:maxLength value="4"/>
391 </xs:restriction>
392 </xs:simpleType>
393 <xs:simpleType name="ExternalLocalInstrument1Code">
394 <xs:restriction base="xs:string">
395 <xs:minLength value="1"/>
396 <xs:maxLength value="35"/>
397 </xs:restriction>
398 </xs:simpleType>
399 <xs:simpleType name="ExternalOrganisationIdentification1Code">
400 <xs:restriction base="xs:string">
401 <xs:minLength value="1"/>
402 <xs:maxLength value="4"/>
403 </xs:restriction>
404 </xs:simpleType>
405 <xs:simpleType name="ExternalPersonIdentification1Code">
406 <xs:restriction base="xs:string">
407 <xs:minLength value="1"/>
408 <xs:maxLength value="4"/>
409 </xs:restriction>
410 </xs:simpleType>
411 <xs:simpleType name="ExternalPurpose1Code">
412 <xs:restriction base="xs:string">
413 <xs:minLength value="1"/>
414 <xs:maxLength value="4"/>
415 </xs:restriction>
416 </xs:simpleType>
417 <xs:simpleType name="ExternalServiceLevel1Code">
418 <xs:restriction base="xs:string">
419 <xs:minLength value="1"/>
420 <xs:maxLength value="4"/>
421 </xs:restriction>
422 </xs:simpleType>
423 <xs:simpleType name="ExternalTaxAmountType1Code">
424 <xs:restriction base="xs:string">
425 <xs:minLength value="1"/>
426 <xs:maxLength value="4"/>
427 </xs:restriction>
428 </xs:simpleType>
429 <xs:complexType name="FinancialIdentificationSchemeName1Choice">
430 <xs:choice>
431 <xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
432 <xs:element name="Prtry" type="Max35Text"/>
433 </xs:choice>
434 </xs:complexType>
435 <xs:complexType name="FinancialInstitutionIdentification8">
436 <xs:sequence>
437 <xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/>
438 <xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
439 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
440 <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
441 <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
442 </xs:sequence>
443 </xs:complexType>
444 <xs:complexType name="GenericAccountIdentification1">
445 <xs:sequence>
446 <xs:element name="Id" type="Max34Text"/>
447 <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
448 <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
449 </xs:sequence>
450 </xs:complexType>
451 <xs:complexType name="GenericFinancialIdentification1">
452 <xs:sequence>
453 <xs:element name="Id" type="Max35Text"/>
454 <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
455 <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
456 </xs:sequence>
457 </xs:complexType>
458 <xs:complexType name="GenericOrganisationIdentification1">
459 <xs:sequence>
460 <xs:element name="Id" type="Max35Text"/>
461 <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
462 <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
463 </xs:sequence>
464 </xs:complexType>
465 <xs:complexType name="GenericPersonIdentification1">
466 <xs:sequence>
467 <xs:element name="Id" type="Max35Text"/>
468 <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
469 <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
470 </xs:sequence>
471 </xs:complexType>
472 <xs:complexType name="GroupHeader48">
473 <xs:sequence>
474 <xs:element name="MsgId" type="Max35Text"/>
475 <xs:element name="CreDtTm" type="ISODateTime"/>
476 <xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
477 <xs:element name="NbOfTxs" type="Max15NumericText"/>
478 <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
479 <xs:element name="InitgPty" type="PartyIdentification43"/>
480 <xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
481 </xs:sequence>
482 </xs:complexType>
483 <xs:simpleType name="IBAN2007Identifier">
484 <xs:restriction base="xs:string">
485 <xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
486 </xs:restriction>
487 </xs:simpleType>
488 <xs:simpleType name="ISODate">
489 <xs:restriction base="xs:date"/>
490 </xs:simpleType>
491 <xs:simpleType name="ISODateTime">
492 <xs:restriction base="xs:dateTime"/>
493 </xs:simpleType>
494 <xs:simpleType name="Instruction3Code">
495 <xs:restriction base="xs:string">
496 <xs:enumeration value="CHQB"/>
497 <xs:enumeration value="HOLD"/>
498 <xs:enumeration value="PHOB"/>
499 <xs:enumeration value="TELB"/>
500 </xs:restriction>
501 </xs:simpleType>
502 <xs:complexType name="InstructionForCreditorAgent1">
503 <xs:sequence>
504 <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
505 <xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
506 </xs:sequence>
507 </xs:complexType>
508 <xs:complexType name="LocalInstrument2Choice">
509 <xs:choice>
510 <xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
511 <xs:element name="Prtry" type="Max35Text"/>
512 </xs:choice>
513 </xs:complexType>
514 <xs:simpleType name="Max10Text">
515 <xs:restriction base="xs:string">
516 <xs:minLength value="1"/>
517 <xs:maxLength value="10"/>
518 </xs:restriction>
519 </xs:simpleType>
520 <xs:simpleType name="Max128Text">
521 <xs:restriction base="xs:string">
522 <xs:minLength value="1"/>
523 <xs:maxLength value="128"/>
524 </xs:restriction>
525 </xs:simpleType>
526 <xs:simpleType name="Max140Text">
527 <xs:restriction base="xs:string">
528 <xs:minLength value="1"/>
529 <xs:maxLength value="140"/>
530 </xs:restriction>
531 </xs:simpleType>
532 <xs:simpleType name="Max15NumericText">
533 <xs:restriction base="xs:string">
534 <xs:pattern value="[0-9]{1,15}"/>
535 </xs:restriction>
536 </xs:simpleType>
537 <xs:simpleType name="Max16Text">
538 <xs:restriction base="xs:string">
539 <xs:minLength value="1"/>
540 <xs:maxLength value="16"/>
541 </xs:restriction>
542 </xs:simpleType>
543 <xs:simpleType name="Max2048Text">
544 <xs:restriction base="xs:string">
545 <xs:minLength value="1"/>
546 <xs:maxLength value="2048"/>
547 </xs:restriction>
548 </xs:simpleType>
549 <xs:simpleType name="Max34Text">
550 <xs:restriction base="xs:string">
551 <xs:minLength value="1"/>
552 <xs:maxLength value="34"/>
553 </xs:restriction>
554 </xs:simpleType>
555 <xs:simpleType name="Max350Text">
556 <xs:restriction base="xs:string">
557 <xs:minLength value="1"/>
558 <xs:maxLength value="350"/>
559 </xs:restriction>
560 </xs:simpleType>
561 <xs:simpleType name="Max35Text">
562 <xs:restriction base="xs:string">
563 <xs:minLength value="1"/>
564 <xs:maxLength value="35"/>
565 </xs:restriction>
566 </xs:simpleType>
567 <xs:simpleType name="Max4Text">
568 <xs:restriction base="xs:string">
569 <xs:minLength value="1"/>
570 <xs:maxLength value="4"/>
571 </xs:restriction>
572 </xs:simpleType>
573 <xs:simpleType name="Max70Text">
574 <xs:restriction base="xs:string">
575 <xs:minLength value="1"/>
576 <xs:maxLength value="70"/>
577 </xs:restriction>
578 </xs:simpleType>
579 <xs:complexType name="NameAndAddress10">
580 <xs:sequence>
581 <xs:element name="Nm" type="Max140Text"/>
582 <xs:element name="Adr" type="PostalAddress6"/>
583 </xs:sequence>
584 </xs:complexType>
585 <xs:simpleType name="NamePrefix1Code">
586 <xs:restriction base="xs:string">
587 <xs:enumeration value="DOCT"/>
588 <xs:enumeration value="MIST"/>
589 <xs:enumeration value="MISS"/>
590 <xs:enumeration value="MADM"/>
591 </xs:restriction>
592 </xs:simpleType>
593 <xs:simpleType name="Number">
594 <xs:restriction base="xs:decimal">
595 <xs:fractionDigits value="0"/>
596 <xs:totalDigits value="18"/>
597 </xs:restriction>
598 </xs:simpleType>
599 <xs:complexType name="OrganisationIdentification8">
600 <xs:sequence>
601 <xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/>
602 <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
603 </xs:sequence>
604 </xs:complexType>
605 <xs:complexType name="OrganisationIdentificationSchemeName1Choice">
606 <xs:choice>
607 <xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
608 <xs:element name="Prtry" type="Max35Text"/>
609 </xs:choice>
610 </xs:complexType>
611 <xs:complexType name="Party11Choice">
612 <xs:choice>
613 <xs:element name="OrgId" type="OrganisationIdentification8"/>
614 <xs:element name="PrvtId" type="PersonIdentification5"/>
615 </xs:choice>
616 </xs:complexType>
617 <xs:complexType name="PartyIdentification43">
618 <xs:sequence>
619 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
620 <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
621 <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/>
622 <xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
623 <xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
624 </xs:sequence>
625 </xs:complexType>
626 <xs:complexType name="PaymentIdentification1">
627 <xs:sequence>
628 <xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
629 <xs:element name="EndToEndId" type="Max35Text"/>
630 </xs:sequence>
631 </xs:complexType>
632 <xs:complexType name="PaymentInstruction9">
633 <xs:sequence>
634 <xs:element name="PmtInfId" type="Max35Text"/>
635 <xs:element name="PmtMtd" type="PaymentMethod3Code"/>
636 <xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
637 <xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
638 <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
639 <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
640 <xs:element name="ReqdExctnDt" type="ISODate"/>
641 <xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
642 <xs:element name="Dbtr" type="PartyIdentification43"/>
643 <xs:element name="DbtrAcct" type="CashAccount24"/>
644 <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
645 <xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
646 <xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
647 <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
648 <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
649 <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount24"/>
650 <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification5"/>
651 <xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransaction6"/>
652 </xs:sequence>
653 </xs:complexType>
654 <xs:simpleType name="PaymentMethod3Code">
655 <xs:restriction base="xs:string">
656 <xs:enumeration value="CHK"/>
657 <xs:enumeration value="TRF"/>
658 <xs:enumeration value="TRA"/>
659 </xs:restriction>
660 </xs:simpleType>
661 <xs:complexType name="PaymentTypeInformation19">
662 <xs:sequence>
663 <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
664 <xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
665 <xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
666 <xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
667 </xs:sequence>
668 </xs:complexType>
669 <xs:simpleType name="PercentageRate">
670 <xs:restriction base="xs:decimal">
671 <xs:fractionDigits value="10"/>
672 <xs:totalDigits value="11"/>
673 </xs:restriction>
674 </xs:simpleType>
675 <xs:complexType name="PersonIdentification5">
676 <xs:sequence>
677 <xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
678 <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
679 </xs:sequence>
680 </xs:complexType>
681 <xs:complexType name="PersonIdentificationSchemeName1Choice">
682 <xs:choice>
683 <xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
684 <xs:element name="Prtry" type="Max35Text"/>
685 </xs:choice>
686 </xs:complexType>
687 <xs:simpleType name="PhoneNumber">
688 <xs:restriction base="xs:string">
689 <xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
690 </xs:restriction>
691 </xs:simpleType>
692 <xs:complexType name="PostalAddress6">
693 <xs:sequence>
694 <xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
695 <xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
696 <xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
697 <xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
698 <xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
699 <xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
700 <xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
701 <xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
702 <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
703 <xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
704 </xs:sequence>
705 </xs:complexType>
706 <xs:simpleType name="Priority2Code">
707 <xs:restriction base="xs:string">
708 <xs:enumeration value="HIGH"/>
709 <xs:enumeration value="NORM"/>
710 </xs:restriction>
711 </xs:simpleType>
712 <xs:complexType name="Purpose2Choice">
713 <xs:choice>
714 <xs:element name="Cd" type="ExternalPurpose1Code"/>
715 <xs:element name="Prtry" type="Max35Text"/>
716 </xs:choice>
717 </xs:complexType>
718 <xs:complexType name="ReferredDocumentInformation3">
719 <xs:sequence>
720 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
721 <xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
722 <xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
723 </xs:sequence>
724 </xs:complexType>
725 <xs:complexType name="ReferredDocumentType1Choice">
726 <xs:choice>
727 <xs:element name="Cd" type="DocumentType5Code"/>
728 <xs:element name="Prtry" type="Max35Text"/>
729 </xs:choice>
730 </xs:complexType>
731 <xs:complexType name="ReferredDocumentType2">
732 <xs:sequence>
733 <xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
734 <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
735 </xs:sequence>
736 </xs:complexType>
737 <xs:complexType name="RegulatoryAuthority2">
738 <xs:sequence>
739 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
740 <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
741 </xs:sequence>
742 </xs:complexType>
743 <xs:complexType name="RegulatoryReporting3">
744 <xs:sequence>
745 <xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
746 <xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
747 <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
748 </xs:sequence>
749 </xs:complexType>
750 <xs:simpleType name="RegulatoryReportingType1Code">
751 <xs:restriction base="xs:string">
752 <xs:enumeration value="CRED"/>
753 <xs:enumeration value="DEBT"/>
754 <xs:enumeration value="BOTH"/>
755 </xs:restriction>
756 </xs:simpleType>
757 <xs:complexType name="RemittanceAmount2">
758 <xs:sequence>
759 <xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
760 <xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
761 <xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
762 <xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
763 <xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
764 <xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
765 </xs:sequence>
766 </xs:complexType>
767 <xs:complexType name="RemittanceInformation7">
768 <xs:sequence>
769 <xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
770 <xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation9"/>
771 </xs:sequence>
772 </xs:complexType>
773 <xs:complexType name="RemittanceLocation2">
774 <xs:sequence>
775 <xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
776 <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
777 <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
778 <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
779 </xs:sequence>
780 </xs:complexType>
781 <xs:simpleType name="RemittanceLocationMethod2Code">
782 <xs:restriction base="xs:string">
783 <xs:enumeration value="FAXI"/>
784 <xs:enumeration value="EDIC"/>
785 <xs:enumeration value="URID"/>
786 <xs:enumeration value="EMAL"/>
787 <xs:enumeration value="POST"/>
788 <xs:enumeration value="SMSM"/>
789 </xs:restriction>
790 </xs:simpleType>
791 <xs:complexType name="ServiceLevel8Choice">
792 <xs:choice>
793 <xs:element name="Cd" type="ExternalServiceLevel1Code"/>
794 <xs:element name="Prtry" type="Max35Text"/>
795 </xs:choice>
796 </xs:complexType>
797 <xs:complexType name="StructuredRegulatoryReporting3">
798 <xs:sequence>
799 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
800 <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
801 <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
802 <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
803 <xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
804 <xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
805 </xs:sequence>
806 </xs:complexType>
807 <xs:complexType name="StructuredRemittanceInformation9">
808 <xs:sequence>
809 <xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
810 <xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/>
811 <xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
812 <xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/>
813 <xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/>
814 <xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
815 </xs:sequence>
816 </xs:complexType>
817 <xs:complexType name="SupplementaryData1">
818 <xs:sequence>
819 <xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/>
820 <xs:element name="Envlp" type="SupplementaryDataEnvelope1"/>
821 </xs:sequence>
822 </xs:complexType>
823 <xs:complexType name="SupplementaryDataEnvelope1">
824 <xs:sequence>
825 <xs:any namespace="##any" processContents="lax"/>
826 </xs:sequence>
827 </xs:complexType>
828 <xs:complexType name="TaxAmount1">
829 <xs:sequence>
830 <xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
831 <xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
832 <xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
833 <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
834 </xs:sequence>
835 </xs:complexType>
836 <xs:complexType name="TaxAmountAndType1">
837 <xs:sequence>
838 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/>
839 <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
840 </xs:sequence>
841 </xs:complexType>
842 <xs:complexType name="TaxAmountType1Choice">
843 <xs:choice>
844 <xs:element name="Cd" type="ExternalTaxAmountType1Code"/>
845 <xs:element name="Prtry" type="Max35Text"/>
846 </xs:choice>
847 </xs:complexType>
848 <xs:complexType name="TaxAuthorisation1">
849 <xs:sequence>
850 <xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
851 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
852 </xs:sequence>
853 </xs:complexType>
854 <xs:complexType name="TaxInformation3">
855 <xs:sequence>
856 <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
857 <xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
858 <xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
859 <xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
860 <xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
861 <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
862 <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
863 <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
864 <xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
865 <xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
866 </xs:sequence>
867 </xs:complexType>
868 <xs:complexType name="TaxParty1">
869 <xs:sequence>
870 <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
871 <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
872 <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
873 </xs:sequence>
874 </xs:complexType>
875 <xs:complexType name="TaxParty2">
876 <xs:sequence>
877 <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
878 <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
879 <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
880 <xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
881 </xs:sequence>
882 </xs:complexType>
883 <xs:complexType name="TaxPeriod1">
884 <xs:sequence>
885 <xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
886 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
887 <xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
888 </xs:sequence>
889 </xs:complexType>
890 <xs:complexType name="TaxRecord1">
891 <xs:sequence>
892 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
893 <xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
894 <xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
895 <xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
896 <xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
897 <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
898 <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
899 <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
900 <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
901 </xs:sequence>
902 </xs:complexType>
903 <xs:complexType name="TaxRecordDetails1">
904 <xs:sequence>
905 <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
906 <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
907 </xs:sequence>
908 </xs:complexType>
909 <xs:simpleType name="TaxRecordPeriod1Code">
910 <xs:restriction base="xs:string">
911 <xs:enumeration value="MM01"/>
912 <xs:enumeration value="MM02"/>
913 <xs:enumeration value="MM03"/>
914 <xs:enumeration value="MM04"/>
915 <xs:enumeration value="MM05"/>
916 <xs:enumeration value="MM06"/>
917 <xs:enumeration value="MM07"/>
918 <xs:enumeration value="MM08"/>
919 <xs:enumeration value="MM09"/>
920 <xs:enumeration value="MM10"/>
921 <xs:enumeration value="MM11"/>
922 <xs:enumeration value="MM12"/>
923 <xs:enumeration value="QTR1"/>
924 <xs:enumeration value="QTR2"/>
925 <xs:enumeration value="QTR3"/>
926 <xs:enumeration value="QTR4"/>
927 <xs:enumeration value="HLF1"/>
928 <xs:enumeration value="HLF2"/>
929 </xs:restriction>
930 </xs:simpleType>
931</xs:schema>
0932
=== modified file 'account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml'
--- account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml 2013-09-23 13:38:15 +0000
+++ account_banking_sepa_credit_transfer/data/payment_type_sepa_sct.xml 2014-03-19 00:47:00 +0000
@@ -1,34 +1,39 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<openerp>2<openerp>
3<data noupdate="1">3<data noupdate="0">
44
55
6<!-- TODO In the suitable_bank_types field, we should restrict to IBAN type and Rib+IBAN of l10n_fr_rib ? -->6<!-- TODO In the suitable_bank_types field, we should restrict to IBAN type and Rib+IBAN of l10n_fr_rib ? -->
7<record id="export_sepa_sct_001_001_05" model="payment.mode.type">
8 <field name="name">SEPA Credit Transfer v05</field>
9 <field name="code">pain.001.001.05</field>
10 <field name="suitable_bank_types"
11 eval="[(6,0,[ref('base_iban.bank_iban')])]" />
12 <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>
13</record>
14
7<record id="export_sepa_sct_001_001_04" model="payment.mode.type">15<record id="export_sepa_sct_001_001_04" model="payment.mode.type">
8 <field name="name">SEPA Credit Transfer v04</field>16 <field name="name">SEPA Credit Transfer v04</field>
9 <field name="code">pain.001.001.04</field>17 <field name="code">pain.001.001.04</field>
10 <field name="suitable_bank_types"18 <field name="suitable_bank_types"
11 eval="[(6,0,[ref('base_iban.bank_iban')])]" />19 eval="[(6,0,[ref('base_iban.bank_iban')])]" />
12 <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>20 <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>
13 <field name="payment_order_type">payment</field>
14</record>21</record>
1522
16<record id="export_sepa_sct_001_001_03" model="payment.mode.type">23<record id="export_sepa_sct_001_001_03" model="payment.mode.type">
17 <field name="name">SEPA Credit Transfer v03</field>24 <field name="name">SEPA Credit Transfer v03 (recommended)</field>
18 <field name="code">pain.001.001.03</field>25 <field name="code">pain.001.001.03</field>
19 <field name="suitable_bank_types"26 <field name="suitable_bank_types"
20 eval="[(6,0,[ref('base_iban.bank_iban')])]" />27 eval="[(6,0,[ref('base_iban.bank_iban')])]" />
21 <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>28 <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>
22 <field name="payment_order_type">payment</field>
23</record>29</record>
2430
25<record id="export_sepa_sct_001_001_02" model="payment.mode.type">31<record id="export_sepa_sct_001_001_02" model="payment.mode.type">
26 <field name="name">SEPA Credit Transfer v02</field>32 <field name="name">SEPA Credit Transfer v02</field>
27 <field name="code">pain.001.001.02</field>33 <field name="code">pain.001.001.02</field>
28 <field name="suitable_bank_types"34 <field name="suitable_bank_types"
29 eval="[(6,0,[ref('base_iban.bank_iban')])]" />35 eval="[(6,0,[ref('base_iban.bank_iban')])]" />
30 <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>36 <field name="ir_model_id" ref="model_banking_export_sepa_wizard"/>
31 <field name="payment_order_type">payment</field>
32</record>37</record>
3338
3439
3540
=== modified file 'account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot'
--- account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot 2013-06-06 08:04:29 +0000
+++ account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot 2014-03-19 00:47:00 +0000
@@ -4,10 +4,10 @@
4#4#
5msgid ""5msgid ""
6msgstr ""6msgstr ""
7"Project-Id-Version: OpenERP Server 6.1\n"7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-06-06 08:01+0000\n"9"POT-Creation-Date: 2013-12-23 22:49+0000\n"
10"PO-Revision-Date: 2013-06-06 08:01+0000\n"10"PO-Revision-Date: 2013-12-23 22:49+0000\n"
11"Last-Translator: <>\n"11"Last-Translator: <>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
@@ -16,24 +16,14 @@
16"Plural-Forms: \n"16"Plural-Forms: \n"
1717
18#. module: account_banking_sepa_credit_transfer18#. module: account_banking_sepa_credit_transfer
19#: field:banking.export.sepa,file:0
20#: field:banking.export.sepa.wizard,file_id:0
21msgid "SEPA XML file"
22msgstr ""
23
24#. module: account_banking_sepa_credit_transfer
25#: view:banking.export.sepa:0
26msgid "Payment order"
27msgstr ""
28
29#. module: account_banking_sepa_credit_transfer
30#: selection:banking.export.sepa.wizard,state:019#: selection:banking.export.sepa.wizard,state:0
31msgid "Create"20msgid "Create"
32msgstr ""21msgstr ""
3322
34#. module: account_banking_sepa_credit_transfer23#. module: account_banking_sepa_credit_transfer
35#: help:banking.export.sepa.wizard,msg_identification:024#: field:banking.export.sepa,nb_transactions:0
36msgid "This is the message identification of the entire SEPA XML file. 35 characters max."25#: field:banking.export.sepa.wizard,nb_transactions:0
26msgid "Number of Transactions"
37msgstr ""27msgstr ""
3828
39#. module: account_banking_sepa_credit_transfer29#. module: account_banking_sepa_credit_transfer
@@ -43,11 +33,6 @@
43msgstr ""33msgstr ""
4434
45#. module: account_banking_sepa_credit_transfer35#. module: account_banking_sepa_credit_transfer
46#: view:banking.export.sepa:0
47msgid "General information"
48msgstr ""
49
50#. module: account_banking_sepa_credit_transfer
51#: field:banking.export.sepa,state:036#: field:banking.export.sepa,state:0
52#: field:banking.export.sepa.wizard,state:037#: field:banking.export.sepa.wizard,state:0
53msgid "State"38msgid "State"
@@ -59,9 +44,8 @@
59msgstr ""44msgstr ""
6045
61#. module: account_banking_sepa_credit_transfer46#. module: account_banking_sepa_credit_transfer
62#: field:banking.export.sepa,prefered_exec_date:047#: help:banking.export.sepa.wizard,charge_bearer:0
63#: field:banking.export.sepa.wizard,prefered_exec_date:048msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
64msgid "Prefered execution date"
65msgstr ""49msgstr ""
6650
67#. module: account_banking_sepa_credit_transfer51#. module: account_banking_sepa_credit_transfer
@@ -71,13 +55,19 @@
71msgstr ""55msgstr ""
7256
73#. module: account_banking_sepa_credit_transfer57#. module: account_banking_sepa_credit_transfer
74#: field:banking.export.sepa,generation_date:058#: field:banking.export.sepa,batch_booking:0
75msgid "Generation date"59#: field:banking.export.sepa.wizard,batch_booking:0
60msgid "Batch Booking"
61msgstr ""
62
63#. module: account_banking_sepa_credit_transfer
64#: selection:banking.export.sepa,state:0
65msgid "Sent"
76msgstr ""66msgstr ""
7767
78#. module: account_banking_sepa_credit_transfer68#. module: account_banking_sepa_credit_transfer
79#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard69#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard
80msgid "Export SEPA Credit Transfer XML file"70msgid "Export SEPA Credit Transfer File"
81msgstr ""71msgstr ""
8272
83#. module: account_banking_sepa_credit_transfer73#. module: account_banking_sepa_credit_transfer
@@ -96,19 +86,15 @@
96msgstr ""86msgstr ""
9787
98#. module: account_banking_sepa_credit_transfer88#. module: account_banking_sepa_credit_transfer
99#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order89#: selection:banking.export.sepa,charge_bearer:0
100msgid "Generated SEPA files"90#: selection:banking.export.sepa.wizard,charge_bearer:0
101msgstr ""91msgid "Following Service Level"
10292msgstr ""
103#. module: account_banking_sepa_credit_transfer93
104#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa94#. module: account_banking_sepa_credit_transfer
105#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa95#: selection:banking.export.sepa,charge_bearer:0
106msgid "Generated SEPA XML files"96#: selection:banking.export.sepa.wizard,charge_bearer:0
107msgstr ""97msgid "Borne by Creditor"
108
109#. module: account_banking_sepa_credit_transfer
110#: selection:banking.export.sepa,state:0
111msgid "Sent"
112msgstr ""98msgstr ""
11399
114#. module: account_banking_sepa_credit_transfer100#. module: account_banking_sepa_credit_transfer
@@ -122,90 +108,80 @@
122msgstr ""108msgstr ""
123109
124#. module: account_banking_sepa_credit_transfer110#. module: account_banking_sepa_credit_transfer
125#: field:banking.export.sepa,msg_identification:0111#: selection:banking.export.sepa,charge_bearer:0
126#: field:banking.export.sepa.wizard,msg_identification:0112#: selection:banking.export.sepa.wizard,charge_bearer:0
127msgid "Message identification"113msgid "Borne by Debtor"
128msgstr ""114msgstr ""
129115
130#. module: account_banking_sepa_credit_transfer116#. module: account_banking_sepa_credit_transfer
131#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:284117#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:128
118#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:245
132#, python-format119#, python-format
133msgid "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"120msgid "Error:"
134msgstr ""121msgstr ""
135122
136#. module: account_banking_sepa_credit_transfer123#. module: account_banking_sepa_credit_transfer
137#: field:banking.export.sepa,total_amount:0124#: field:banking.export.sepa,total_amount:0
138#: field:banking.export.sepa.wizard,total_amount:0125#: field:banking.export.sepa.wizard,total_amount:0
139msgid "Total amount"126msgid "Total Amount"
127msgstr ""
128
129#. module: account_banking_sepa_credit_transfer
130#: field:banking.export.sepa,charge_bearer:0
131#: field:banking.export.sepa.wizard,charge_bearer:0
132msgid "Charge Bearer"
133msgstr ""
134
135#. module: account_banking_sepa_credit_transfer
136#: view:banking.export.sepa.wizard:0
137msgid "SEPA File Generation"
138msgstr ""
139
140#. module: account_banking_sepa_credit_transfer
141#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa
142msgid "SEPA export"
143msgstr ""
144
145#. module: account_banking_sepa_credit_transfer
146#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:246
147#, python-format
148msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')."
149msgstr ""
150
151#. module: account_banking_sepa_credit_transfer
152#: field:banking.export.sepa,file:0
153#: field:banking.export.sepa.wizard,file_id:0
154msgid "SEPA XML File"
140msgstr ""155msgstr ""
141156
142#. module: account_banking_sepa_credit_transfer157#. module: account_banking_sepa_credit_transfer
143#: help:banking.export.sepa,charge_bearer:0158#: help:banking.export.sepa,charge_bearer:0
144#: help:banking.export.sepa.wizard,charge_bearer:0159msgid "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."
145msgid "Shared : transaction charges on the sender side are to be borne by the debtor, transaction charges on the receiver side are to be borne by the creditor (most transfers use this). Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor. Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme."
146msgstr ""160msgstr ""
147161
148#. module: account_banking_sepa_credit_transfer162#. module: account_banking_sepa_credit_transfer
149#: selection:banking.export.sepa,charge_bearer:0163#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:129
150#: selection:banking.export.sepa.wizard,charge_bearer:0164#, python-format
151msgid "Borne by creditor"165msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'."
152msgstr ""166msgstr ""
153167
154#. module: account_banking_sepa_credit_transfer168#. module: account_banking_sepa_credit_transfer
155#: view:banking.export.sepa:0169#: view:banking.export.sepa:0
156#: field:banking.export.sepa,payment_order_ids:0170#: field:banking.export.sepa,payment_order_ids:0
157#: field:banking.export.sepa.wizard,payment_order_ids:0171#: field:banking.export.sepa.wizard,payment_order_ids:0
158msgid "Payment orders"172msgid "Payment Orders"
159msgstr ""173msgstr ""
160174
161#. module: account_banking_sepa_credit_transfer175#. module: account_banking_sepa_credit_transfer
162#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90176#: view:banking.export.sepa:0
163#, python-format177msgid "General Information"
164msgid "This IBAN is not valid : %s"178msgstr ""
165msgstr ""179
166180#. module: account_banking_sepa_credit_transfer
167#. module: account_banking_sepa_credit_transfer181#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order
168#: view:banking.export.sepa.wizard:0182#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa
169msgid "SEPA XML file generation"183#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa
170msgstr ""184msgid "SEPA Credit Transfer Files"
171
172#. module: account_banking_sepa_credit_transfer
173#: view:banking.export.sepa.wizard:0
174msgid "Reference for further communication"
175msgstr ""
176
177#. module: account_banking_sepa_credit_transfer
178#: view:banking.export.sepa.wizard:0
179msgid "Processing details"
180msgstr ""
181
182#. module: account_banking_sepa_credit_transfer
183#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa
184msgid "SEPA export"
185msgstr ""
186
187#. module: account_banking_sepa_credit_transfer
188#: selection:banking.export.sepa,charge_bearer:0
189#: selection:banking.export.sepa.wizard,charge_bearer:0
190msgid "Borne by debtor"
191msgstr ""
192
193#. module: account_banking_sepa_credit_transfer
194#: field:banking.export.sepa,nb_transactions:0
195#: field:banking.export.sepa.wizard,nb_transactions:0
196msgid "Number of transactions"
197msgstr ""
198
199#. module: account_banking_sepa_credit_transfer
200#: selection:banking.export.sepa,charge_bearer:0
201#: selection:banking.export.sepa.wizard,charge_bearer:0
202msgid "Following service level"
203msgstr ""
204
205#. module: account_banking_sepa_credit_transfer
206#: field:banking.export.sepa,charge_bearer:0
207#: field:banking.export.sepa.wizard,charge_bearer:0
208msgid "Charge bearer"
209msgstr ""185msgstr ""
210186
211#. module: account_banking_sepa_credit_transfer187#. module: account_banking_sepa_credit_transfer
@@ -215,11 +191,6 @@
215msgstr ""191msgstr ""
216192
217#. module: account_banking_sepa_credit_transfer193#. module: account_banking_sepa_credit_transfer
218#: help:banking.export.sepa.wizard,prefered_exec_date:0
219msgid "This is the date on which the file should be processed by the bank. Please keep in mind that banks only execute on working days and typically use a delay of two days between execution date and effective transfer date."
220msgstr ""
221
222#. module: account_banking_sepa_credit_transfer
223#: field:banking.export.sepa.wizard,file:0194#: field:banking.export.sepa.wizard,file:0
224msgid "File"195msgid "File"
225msgstr ""196msgstr ""
@@ -230,22 +201,7 @@
230msgstr ""201msgstr ""
231202
232#. module: account_banking_sepa_credit_transfer203#. module: account_banking_sepa_credit_transfer
233#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:135204#: field:banking.export.sepa,create_date:0
234#, python-format205msgid "Generation Date"
235msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03' and 'pain.001.001.04'."
236msgstr ""
237
238#. module: account_banking_sepa_credit_transfer
239#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90
240#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:135
241#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:284
242#, python-format
243msgid "Error :"
244msgstr ""
245
246#. module: account_banking_sepa_credit_transfer
247#: field:banking.export.sepa,batch_booking:0
248#: field:banking.export.sepa.wizard,batch_booking:0
249msgid "Batch booking"
250msgstr ""206msgstr ""
251207
252208
=== modified file 'account_banking_sepa_credit_transfer/i18n/fr.po'
--- account_banking_sepa_credit_transfer/i18n/fr.po 2013-06-06 08:04:29 +0000
+++ account_banking_sepa_credit_transfer/i18n/fr.po 2014-03-19 00:47:00 +0000
@@ -4,10 +4,10 @@
4#4#
5msgid ""5msgid ""
6msgstr ""6msgstr ""
7"Project-Id-Version: OpenERP Server 6.1\n"7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-06-06 08:01+0000\n"9"POT-Creation-Date: 2013-12-23 22:52+0000\n"
10"PO-Revision-Date: 2013-06-06 08:01+0000\n"10"PO-Revision-Date: 2013-12-23 22:52+0000\n"
11"Last-Translator: <>\n"11"Last-Translator: <>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
@@ -16,25 +16,15 @@
16"Plural-Forms: \n"16"Plural-Forms: \n"
1717
18#. module: account_banking_sepa_credit_transfer18#. module: account_banking_sepa_credit_transfer
19#: field:banking.export.sepa,file:0
20#: field:banking.export.sepa.wizard,file_id:0
21msgid "SEPA XML file"
22msgstr "Fichier SEPA XML"
23
24#. module: account_banking_sepa_credit_transfer
25#: view:banking.export.sepa:0
26msgid "Payment order"
27msgstr "Ordre de paiement"
28
29#. module: account_banking_sepa_credit_transfer
30#: selection:banking.export.sepa.wizard,state:019#: selection:banking.export.sepa.wizard,state:0
31msgid "Create"20msgid "Create"
32msgstr "Créer"21msgstr "Créer"
3322
34#. module: account_banking_sepa_credit_transfer23#. module: account_banking_sepa_credit_transfer
35#: help:banking.export.sepa.wizard,msg_identification:024#: field:banking.export.sepa,nb_transactions:0
36msgid "This is the message identification of the entire SEPA XML file. 35 characters max."25#: field:banking.export.sepa.wizard,nb_transactions:0
37msgstr "Ceci est le libellé d'identification du fichier SEPA XML. 35 caractères maximum."26msgid "Number of Transactions"
27msgstr "Nombre de transactions"
3828
39#. module: account_banking_sepa_credit_transfer29#. module: account_banking_sepa_credit_transfer
40#: field:banking.export.sepa,filename:030#: field:banking.export.sepa,filename:0
@@ -43,11 +33,6 @@
43msgstr "Nom du fichier"33msgstr "Nom du fichier"
4434
45#. module: account_banking_sepa_credit_transfer35#. module: account_banking_sepa_credit_transfer
46#: view:banking.export.sepa:0
47msgid "General information"
48msgstr "Informations générales"
49
50#. module: account_banking_sepa_credit_transfer
51#: field:banking.export.sepa,state:036#: field:banking.export.sepa,state:0
52#: field:banking.export.sepa.wizard,state:037#: field:banking.export.sepa.wizard,state:0
53msgid "State"38msgid "State"
@@ -59,10 +44,9 @@
59msgstr "Brouillon"44msgstr "Brouillon"
6045
61#. module: account_banking_sepa_credit_transfer46#. module: account_banking_sepa_credit_transfer
62#: field:banking.export.sepa,prefered_exec_date:047#: help:banking.export.sepa.wizard,charge_bearer:0
63#: field:banking.export.sepa.wizard,prefered_exec_date:048msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor."
64msgid "Prefered execution date"49msgstr "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."
65msgstr "Date d'exécution demandée"
6650
67#. module: account_banking_sepa_credit_transfer51#. module: account_banking_sepa_credit_transfer
68#: selection:banking.export.sepa,charge_bearer:052#: selection:banking.export.sepa,charge_bearer:0
@@ -71,14 +55,20 @@
71msgstr "Partagé"55msgstr "Partagé"
7256
73#. module: account_banking_sepa_credit_transfer57#. module: account_banking_sepa_credit_transfer
74#: field:banking.export.sepa,generation_date:058#: field:banking.export.sepa,batch_booking:0
75msgid "Generation date"59#: field:banking.export.sepa.wizard,batch_booking:0
76msgstr "Date de génération"60msgid "Batch Booking"
61msgstr "Débit groupé"
62
63#. module: account_banking_sepa_credit_transfer
64#: selection:banking.export.sepa,state:0
65msgid "Sent"
66msgstr "Envoyé"
7767
78#. module: account_banking_sepa_credit_transfer68#. module: account_banking_sepa_credit_transfer
79#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard69#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard
80msgid "Export SEPA Credit Transfer XML file"70msgid "Export SEPA Credit Transfer File"
81msgstr "Exporte the fichier de virement SEPA XML"71msgstr "Exporte le fichier de virement SEPA"
8272
83#. module: account_banking_sepa_credit_transfer73#. module: account_banking_sepa_credit_transfer
84#: view:banking.export.sepa:074#: view:banking.export.sepa:0
@@ -96,20 +86,16 @@
96msgstr "Réconcilié"86msgstr "Réconcilié"
9787
98#. module: account_banking_sepa_credit_transfer88#. module: account_banking_sepa_credit_transfer
99#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order89#: selection:banking.export.sepa,charge_bearer:0
100msgid "Generated SEPA files"90#: selection:banking.export.sepa.wizard,charge_bearer:0
101msgstr "Fichiers SEPA générés"91msgid "Following Service Level"
10292msgstr "Suivant le niveau de service"
103#. module: account_banking_sepa_credit_transfer93
104#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa94#. module: account_banking_sepa_credit_transfer
105#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa95#: selection:banking.export.sepa,charge_bearer:0
106msgid "Generated SEPA XML files"96#: selection:banking.export.sepa.wizard,charge_bearer:0
107msgstr "Fichiers SEPA XML générés"97msgid "Borne by Creditor"
10898msgstr "Supportés par le destinataire"
109#. module: account_banking_sepa_credit_transfer
110#: selection:banking.export.sepa,state:0
111msgid "Sent"
112msgstr "Envoyé"
11399
114#. module: account_banking_sepa_credit_transfer100#. module: account_banking_sepa_credit_transfer
115#: view:banking.export.sepa.wizard:0101#: view:banking.export.sepa.wizard:0
@@ -122,91 +108,81 @@
122msgstr "Générer"108msgstr "Générer"
123109
124#. module: account_banking_sepa_credit_transfer110#. module: account_banking_sepa_credit_transfer
125#: field:banking.export.sepa,msg_identification:0111#: selection:banking.export.sepa,charge_bearer:0
126#: field:banking.export.sepa.wizard,msg_identification:0112#: selection:banking.export.sepa.wizard,charge_bearer:0
127msgid "Message identification"113msgid "Borne by Debtor"
128msgstr "Libellé d'identification"114msgstr "Supportés par l'émetteur"
129115
130#. module: account_banking_sepa_credit_transfer116#. module: account_banking_sepa_credit_transfer
131#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:284117#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:128
118#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:245
132#, python-format119#, python-format
133msgid "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"120msgid "Error:"
134msgstr "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"121msgstr "Erreur :"
135122
136#. module: account_banking_sepa_credit_transfer123#. module: account_banking_sepa_credit_transfer
137#: field:banking.export.sepa,total_amount:0124#: field:banking.export.sepa,total_amount:0
138#: field:banking.export.sepa.wizard,total_amount:0125#: field:banking.export.sepa.wizard,total_amount:0
139msgid "Total amount"126msgid "Total Amount"
140msgstr "Montant total"127msgstr "Montant total"
141128
142#. module: account_banking_sepa_credit_transfer129#. module: account_banking_sepa_credit_transfer
130#: field:banking.export.sepa,charge_bearer:0
131#: field:banking.export.sepa.wizard,charge_bearer:0
132msgid "Charge Bearer"
133msgstr "Répartition des frais"
134
135#. module: account_banking_sepa_credit_transfer
136#: view:banking.export.sepa.wizard:0
137msgid "SEPA File Generation"
138msgstr "Génération du fichier SEPA"
139
140#. module: account_banking_sepa_credit_transfer
141#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa
142msgid "SEPA export"
143msgstr "Export SEPA"
144
145#. module: account_banking_sepa_credit_transfer
146#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:246
147#, python-format
148msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')."
149msgstr "Compte bancaire manquant sur la facture '%s' (référence de la ligne de paiement : '%s')."
150
151#. module: account_banking_sepa_credit_transfer
152#: field:banking.export.sepa,file:0
153#: field:banking.export.sepa.wizard,file_id:0
154msgid "SEPA XML File"
155msgstr "Fichier SEPA XML"
156
157#. module: account_banking_sepa_credit_transfer
143#: help:banking.export.sepa,charge_bearer:0158#: help:banking.export.sepa,charge_bearer:0
144#: help:banking.export.sepa.wizard,charge_bearer:0159msgid "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."
145msgid "Shared : transaction charges on the sender side are to be borne by the debtor, transaction charges on the receiver side are to be borne by the creditor (most transfers use this). Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor. Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme."160msgstr "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."
146msgstr "Partagés : les frais bancaires côté émetteur sont à la charge de l'émetteur et les frais bancaires côté destinataire sont à la charge du destinataire (la plupart des virements utilisent cette répartition). Supportés par le destinataire : tous les frais bancaires sont à la charge du destinataire. Supportés par l'émetteur : tous les frais bancaires sont à la charge de l'émetteur. Suivant le niveau de service : la répartition des frais bancaires suit les règles pré-établies dans le contrat avec la banque."
147161
148#. module: account_banking_sepa_credit_transfer162#. module: account_banking_sepa_credit_transfer
149#: selection:banking.export.sepa,charge_bearer:0163#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:129
150#: selection:banking.export.sepa.wizard,charge_bearer:0164#, python-format
151msgid "Borne by creditor"165msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'."
152msgstr "Supportés par le destinataire"166msgstr "Le code du Type de paiement '%s' n'est pas supporté. Les seuls codes de Type de paiement supportés pour les virements SEPA sont 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' et 'pain.001.001.05'."
153167
154#. module: account_banking_sepa_credit_transfer168#. module: account_banking_sepa_credit_transfer
155#: view:banking.export.sepa:0169#: view:banking.export.sepa:0
156#: field:banking.export.sepa,payment_order_ids:0170#: field:banking.export.sepa,payment_order_ids:0
157#: field:banking.export.sepa.wizard,payment_order_ids:0171#: field:banking.export.sepa.wizard,payment_order_ids:0
158msgid "Payment orders"172msgid "Payment Orders"
159msgstr "Ordres de paiement"173msgstr "Ordres de paiement"
160174
161#. module: account_banking_sepa_credit_transfer175#. module: account_banking_sepa_credit_transfer
162#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90176#: view:banking.export.sepa:0
163#, python-format177msgid "General Information"
164msgid "This IBAN is not valid : %s"178msgstr "Informations générales"
165msgstr "Cet IBAN n'est pas valide : %s"179
166180#. module: account_banking_sepa_credit_transfer
167#. module: account_banking_sepa_credit_transfer181#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order
168#: view:banking.export.sepa.wizard:0182#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa
169msgid "SEPA XML file generation"183#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa
170msgstr "Génération du fichier SEPA XML"184msgid "SEPA Credit Transfer Files"
171185msgstr "Fichiers de virement SEPA"
172#. module: account_banking_sepa_credit_transfer
173#: view:banking.export.sepa.wizard:0
174msgid "Reference for further communication"
175msgstr "Référence pour communication ultérieure"
176
177#. module: account_banking_sepa_credit_transfer
178#: view:banking.export.sepa.wizard:0
179msgid "Processing details"
180msgstr "Paramètres"
181
182#. module: account_banking_sepa_credit_transfer
183#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa
184msgid "SEPA export"
185msgstr "Export SEPA"
186
187#. module: account_banking_sepa_credit_transfer
188#: selection:banking.export.sepa,charge_bearer:0
189#: selection:banking.export.sepa.wizard,charge_bearer:0
190msgid "Borne by debtor"
191msgstr "Supportés par l'émetteur"
192
193#. module: account_banking_sepa_credit_transfer
194#: field:banking.export.sepa,nb_transactions:0
195#: field:banking.export.sepa.wizard,nb_transactions:0
196msgid "Number of transactions"
197msgstr "Nombre de transactions"
198
199#. module: account_banking_sepa_credit_transfer
200#: selection:banking.export.sepa,charge_bearer:0
201#: selection:banking.export.sepa.wizard,charge_bearer:0
202msgid "Following service level"
203msgstr "Suivant le niveau de service"
204
205#. module: account_banking_sepa_credit_transfer
206#: field:banking.export.sepa,charge_bearer:0
207#: field:banking.export.sepa.wizard,charge_bearer:0
208msgid "Charge bearer"
209msgstr "Répartition des frais"
210186
211#. module: account_banking_sepa_credit_transfer187#. module: account_banking_sepa_credit_transfer
212#: help:banking.export.sepa,batch_booking:0188#: help:banking.export.sepa,batch_booking:0
@@ -215,11 +191,6 @@
215msgstr "Si coché, le relevé de compte ne comportera qu'une ligne de débit pour tous les virements du fichier SEPA XML ; si non coché, le relevé de compte comportera une ligne de débit pour chaque virement du fichier SEPA XML."191msgstr "Si coché, le relevé de compte ne comportera qu'une ligne de débit pour tous les virements du fichier SEPA XML ; si non coché, le relevé de compte comportera une ligne de débit pour chaque virement du fichier SEPA XML."
216192
217#. module: account_banking_sepa_credit_transfer193#. module: account_banking_sepa_credit_transfer
218#: help:banking.export.sepa.wizard,prefered_exec_date:0
219msgid "This is the date on which the file should be processed by the bank. Please keep in mind that banks only execute on working days and typically use a delay of two days between execution date and effective transfer date."
220msgstr "C'est la date à laquelle le fichier doit être traité par la banque. Gardez en tête que les banques réalisent des traitements seulement les jours ouvrés et ont habituellement un délai de 2 jours entre la date de traitement et la date du transfert effectif."
221
222#. module: account_banking_sepa_credit_transfer
223#: field:banking.export.sepa.wizard,file:0194#: field:banking.export.sepa.wizard,file:0
224msgid "File"195msgid "File"
225msgstr "Fichier"196msgstr "Fichier"
@@ -230,22 +201,7 @@
230msgstr "Annuler"201msgstr "Annuler"
231202
232#. module: account_banking_sepa_credit_transfer203#. module: account_banking_sepa_credit_transfer
233#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:135204#: field:banking.export.sepa,create_date:0
234#, python-format205msgid "Generation Date"
235msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03' and 'pain.001.001.04'."206msgstr "Date de génération"
236msgstr "Le code '%s' pour le Type de Paiment n'est pas supporté. Les seuls codes de Types de Paiement supportés pour les virements SEPA sont 'pain.001.001.02', 'pain.001.001.03' et 'pain.001.001.04'."
237
238#. module: account_banking_sepa_credit_transfer
239#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90
240#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:135
241#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:284
242#, python-format
243msgid "Error :"
244msgstr "Erreur :"
245
246#. module: account_banking_sepa_credit_transfer
247#: field:banking.export.sepa,batch_booking:0
248#: field:banking.export.sepa.wizard,batch_booking:0
249msgid "Batch booking"
250msgstr "Débit groupé"
251207
252208
=== added file 'account_banking_sepa_credit_transfer/i18n/nl.po'
--- account_banking_sepa_credit_transfer/i18n/nl.po 1970-01-01 00:00:00 +0000
+++ account_banking_sepa_credit_transfer/i18n/nl.po 2014-03-19 00:47:00 +0000
@@ -0,0 +1,405 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * account_banking_sepa_credit_transfer
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-11-13 09:13+0000\n"
10"PO-Revision-Date: 2013-12-03 11:49+0000\n"
11"Last-Translator: Jan Jurkus (GCE CAD-Service) <ict@gcecad-service.nl>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"X-Launchpad-Export-Date: 2013-12-04 05:59+0000\n"
17"X-Generator: Launchpad (build 16861)\n"
18
19#. module: account_banking_sepa_credit_transfer
20#: field:banking.export.sepa,prefered_exec_date:0
21#: field:banking.export.sepa.wizard,prefered_exec_date:0
22msgid "Prefered Execution Date"
23msgstr "Voorkeurs uitvoerdatum"
24
25#. module: account_banking_sepa_credit_transfer
26#: selection:banking.export.sepa.wizard,state:0
27msgid "Create"
28msgstr "Aanmaken"
29
30#. module: account_banking_sepa_credit_transfer
31#: field:banking.export.sepa,nb_transactions:0
32#: field:banking.export.sepa.wizard,nb_transactions:0
33msgid "Number of Transactions"
34msgstr "Aantal transacties"
35
36#. module: account_banking_sepa_credit_transfer
37#: field:banking.export.sepa,filename:0
38#: field:banking.export.sepa.wizard,filename:0
39msgid "Filename"
40msgstr "Bestandsnaam"
41
42#. module: account_banking_sepa_credit_transfer
43#: field:banking.export.sepa,state:0
44#: field:banking.export.sepa.wizard,state:0
45msgid "State"
46msgstr "Status"
47
48#. module: account_banking_sepa_credit_transfer
49#: selection:banking.export.sepa,state:0
50msgid "Draft"
51msgstr "Concept"
52
53#. module: account_banking_sepa_credit_transfer
54#: help:banking.export.sepa.wizard,charge_bearer:0
55msgid ""
56"Following service level : transaction charges are to be applied following "
57"the rules agreed in the service level and/or scheme (SEPA Core messages must "
58"use this). Shared : transaction charges on the debtor side are to be borne "
59"by the debtor, transaction charges on the creditor side are to be borne by "
60"the creditor. Borne by creditor : all transaction charges are to be borne by "
61"the creditor. Borne by debtor : all transaction charges are to be borne by "
62"the debtor."
63msgstr ""
64"Volg service level: Transactie kosten worden toegepast volgens de "
65"afgesproken regels in het service level en/of schema (Voor SEPA berichten "
66"deze gebruiken). Gedeeld : De transactiekosten aan de debiteur zijde zijn "
67"voor de schuldeiser, transactiekosten aan de crediteur kant zijn voor de "
68"schuldenaar. Rekening van de schuldenaar: Alle transactie kosten zijn voor "
69"rekening van de schuldenaar. Rekening van de schuldeiser: Alle transactie "
70"kosten zijn voor rekening van de schuldeiser."
71
72#. module: account_banking_sepa_credit_transfer
73#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:117
74#, python-format
75msgid ""
76"Cannot compute the '%s' of the Payment Line with Invoice Reference '%s'."
77msgstr ""
78"Niet mogelijk de '%s' van de betaalregel te berekenen met factuurreferentie "
79"'%s'."
80
81#. module: account_banking_sepa_credit_transfer
82#: selection:banking.export.sepa,charge_bearer:0
83#: selection:banking.export.sepa.wizard,charge_bearer:0
84msgid "Shared"
85msgstr "Gedeeld"
86
87#. module: account_banking_sepa_credit_transfer
88#: field:banking.export.sepa,batch_booking:0
89#: field:banking.export.sepa.wizard,batch_booking:0
90msgid "Batch Booking"
91msgstr "Bach verwerking"
92
93#. module: account_banking_sepa_credit_transfer
94#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard
95msgid "Export SEPA Credit Transfer XML file"
96msgstr "Exporteer SEPA XML overschrijvingsbestand"
97
98#. module: account_banking_sepa_credit_transfer
99#: view:banking.export.sepa:0
100msgid "SEPA Credit Transfer"
101msgstr "SEPA overschrijving"
102
103#. module: account_banking_sepa_credit_transfer
104#: selection:banking.export.sepa.wizard,state:0
105msgid "Finish"
106msgstr "Gereed"
107
108#. module: account_banking_sepa_credit_transfer
109#: selection:banking.export.sepa,state:0
110msgid "Reconciled"
111msgstr "Afgeletterd"
112
113#. module: account_banking_sepa_credit_transfer
114#: selection:banking.export.sepa,charge_bearer:0
115#: selection:banking.export.sepa.wizard,charge_bearer:0
116msgid "Following Service Level"
117msgstr "Volg service level"
118
119#. module: account_banking_sepa_credit_transfer
120#: selection:banking.export.sepa,charge_bearer:0
121#: selection:banking.export.sepa.wizard,charge_bearer:0
122msgid "Borne by Creditor"
123msgstr "Rekening van schuldeiser"
124
125#. module: account_banking_sepa_credit_transfer
126#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:122
127#, python-format
128msgid "Cannot compute the '%s'."
129msgstr "Niet mogelijk de '%s' te berekenen."
130
131#. module: account_banking_sepa_credit_transfer
132#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:126
133#, python-format
134msgid "The type of the field '%s' is %s. It should be a string or unicode."
135msgstr ""
136"Het veldsoort van het veld '%s' is %s. Het moet een string of unicode soort "
137"zijn."
138
139#. module: account_banking_sepa_credit_transfer
140#: selection:banking.export.sepa,state:0
141msgid "Sent"
142msgstr "Verzonden"
143
144#. module: account_banking_sepa_credit_transfer
145#: view:banking.export.sepa.wizard:0
146msgid "Validate"
147msgstr "Bevestig"
148
149#. module: account_banking_sepa_credit_transfer
150#: view:banking.export.sepa.wizard:0
151msgid "Generate"
152msgstr "Genereer"
153
154#. module: account_banking_sepa_credit_transfer
155#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:169
156#, python-format
157msgid ""
158"The generated XML file is not valid against the official XML Schema "
159"Definition. The generated XML file and the full error have been written in "
160"the server logs. Here is the error, which may give you an idea on the cause "
161"of the problem : %s"
162msgstr ""
163"Het gegenereerde XML bestand is niet geldig volgens de officiële XML schema "
164"definities. Het gegenereerde XML bestand en de volledige fout zijn "
165"weggeschreven in de server log bestanden. Hier is de fout, wat u een idee "
166"kunt geven over de oorzaak van het probleem: %s\""
167
168#. module: account_banking_sepa_credit_transfer
169#: selection:banking.export.sepa,charge_bearer:0
170#: selection:banking.export.sepa.wizard,charge_bearer:0
171msgid "Borne by Debtor"
172msgstr "Rekening van schuldenaar"
173
174#. module: account_banking_sepa_credit_transfer
175#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90
176#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:116
177#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:121
178#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:130
179#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:168
180#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:206
181#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:350
182#, python-format
183msgid "Error:"
184msgstr "Fout:"
185
186#. module: account_banking_sepa_credit_transfer
187#: field:banking.export.sepa,total_amount:0
188#: field:banking.export.sepa.wizard,total_amount:0
189msgid "Total Amount"
190msgstr "Totaalbedrag"
191
192#. module: account_banking_sepa_credit_transfer
193#: field:banking.export.sepa,charge_bearer:0
194#: field:banking.export.sepa.wizard,charge_bearer:0
195msgid "Charge Bearer"
196msgstr "Kostenverdeling"
197
198#. module: account_banking_sepa_credit_transfer
199#: view:banking.export.sepa.wizard:0
200msgid "SEPA File Generation"
201msgstr "SEPA bestand genereren"
202
203#. module: account_banking_sepa_credit_transfer
204#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:125
205#, python-format
206msgid "Field type error:"
207msgstr "Veldsoort fout:"
208
209#. module: account_banking_sepa_credit_transfer
210#: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa
211msgid "SEPA export"
212msgstr "SEPA export"
213
214#. module: account_banking_sepa_credit_transfer
215#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:351
216#, python-format
217msgid ""
218"Missing Bank Account on invoice '%s' (payment order line reference '%s')."
219msgstr ""
220"Ontbrekende bankrekening op factuur '%s' (betaalregel referentie '%s')"
221
222#. module: account_banking_sepa_credit_transfer
223#: field:banking.export.sepa,file:0
224#: field:banking.export.sepa.wizard,file_id:0
225msgid "SEPA XML File"
226msgstr "SEPA XML bestand"
227
228#. module: account_banking_sepa_credit_transfer
229#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:131
230#, python-format
231msgid "The '%s' is empty or 0. It should have a non-null value."
232msgstr "De '%s' is leeg of 0. Het mag geen lege of nul waarde hebben."
233
234#. module: account_banking_sepa_credit_transfer
235#: help:banking.export.sepa,charge_bearer:0
236msgid ""
237"Following service level : transaction charges are to be applied following "
238"the rules agreed in the service level and/or scheme (SEPA Core messages must "
239"use this). Shared : transaction charges on the creditor side are to be borne "
240"by the creditor, transaction charges on the debtor side are to be borne by "
241"the debtor. Borne by creditor : all transaction charges are to be borne by "
242"the creditor. Borne by debtor : all transaction charges are to be borne by "
243"the debtor."
244msgstr ""
245"Volg service level: Transactie kosten worden toegepast volgens de "
246"afgesproken regels in het service level en/of schema (Voor SEPA berichten "
247"deze gebruiken). Gedeeld : De transactiekosten aan de crediteur zijde zijn "
248"voor de schuldenaar, transactiekosten aan de debiteur kant zijn voor de "
249"schuldeiser. Rekening van de schuldenaar: Alle transactie kosten zijn voor "
250"rekening van de schuldenaar. Rekening van de schuldeiser: Alle transactie "
251"kosten zijn voor rekening van de schuldeiser."
252
253#. module: account_banking_sepa_credit_transfer
254#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:207
255#, python-format
256msgid ""
257"Payment Type Code '%s' is not supported. The only Payment Type Codes "
258"supported for SEPA Credit Transfers are 'pain.001.001.02', "
259"'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'."
260msgstr ""
261"Betaal type code '%s' wordt niet ondersteund. De enige betaal type codes "
262"voor SEPA credit boekingen zijn 'pain.001.001.02', 'pain.001.001.03' en "
263"'pain.001.001.04'."
264
265#. module: account_banking_sepa_credit_transfer
266#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90
267#, python-format
268msgid "This IBAN is not valid : %s"
269msgstr "Deze IBAN is niet geldig : %s"
270
271#. module: account_banking_sepa_credit_transfer
272#: view:banking.export.sepa:0
273#: field:banking.export.sepa,payment_order_ids:0
274#: field:banking.export.sepa.wizard,payment_order_ids:0
275msgid "Payment Orders"
276msgstr "Betaalopdrachten"
277
278#. module: account_banking_sepa_credit_transfer
279#: view:banking.export.sepa:0
280msgid "General Information"
281msgstr "Algemene informatie"
282
283#. module: account_banking_sepa_credit_transfer
284#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.act_banking_export_sepa_payment_order
285#: model:ir.actions.act_window,name:account_banking_sepa_credit_transfer.action_account_banking_sepa
286#: model:ir.ui.menu,name:account_banking_sepa_credit_transfer.menu_account_banking_sepa
287msgid "SEPA Credit Transfer Files"
288msgstr "SEPA Credit Transfer bestanden"
289
290#. module: account_banking_sepa_credit_transfer
291#: help:banking.export.sepa,batch_booking:0
292#: help:banking.export.sepa.wizard,batch_booking:0
293msgid ""
294"If true, the bank statement will display only one debit line for all the "
295"wire transfers of the SEPA XML file ; if false, the bank statement will "
296"display one debit line per wire transfer of the SEPA XML file."
297msgstr ""
298"Indien aangevinkt zal het bankafschrift maar één debet regel weergeven voor "
299"alle overschrijvingen van het SEPA XML bestand. Indien uitgevinkt, zal het "
300"bankafschrift een debet regel weergeven per SEPA XML bestand."
301
302#. module: account_banking_sepa_credit_transfer
303#: help:banking.export.sepa.wizard,prefered_exec_date:0
304msgid ""
305"This is the date on which the file should be processed by the bank. Please "
306"keep in mind that banks only execute on working days and typically use a "
307"delay of two days between execution date and effective transfer date."
308msgstr ""
309"Dit is de datum waarop het bestand zou moeten worden verwerkt door de bank. "
310"Houdt u er rekening mee dat banken alleen op werkdagen de bestanden "
311"verwerken en veelal een vertraging hebben van twee dagen tussen de "
312"verwerkingsdatum en de effectieve overschrijfdatum."
313
314#. module: account_banking_sepa_credit_transfer
315#: field:banking.export.sepa.wizard,file:0
316msgid "File"
317msgstr "Bestand"
318
319#. module: account_banking_sepa_credit_transfer
320#: view:banking.export.sepa.wizard:0
321msgid "Cancel"
322msgstr "Annuleren"
323
324#. module: account_banking_sepa_credit_transfer
325#: field:banking.export.sepa,create_date:0
326msgid "Generation Date"
327msgstr "Aangemaakt op"
328
329#~ msgid "SEPA XML file"
330#~ msgstr "SEPA XML bestand"
331
332#~ msgid "Number of transactions"
333#~ msgstr "Aantal transacties"
334
335#~ msgid ""
336#~ "This is the message identification of the entire SEPA XML file. 35 "
337#~ "characters max."
338#~ msgstr ""
339#~ "Dit is een bericht identificatie van het gehele SEPA XML bestand. Maximaal "
340#~ "35 karakters."
341
342#~ msgid "Prefered execution date"
343#~ msgstr "Voorkeurs uitvoerdatum"
344
345#~ msgid "Generation date"
346#~ msgstr "Aanmaakdatum"
347
348#~ msgid "Message identification"
349#~ msgstr "Bericht identificatie"
350
351#~ msgid "Total amount"
352#~ msgstr "Totaal bedrag"
353
354#~ msgid "Borne by creditor"
355#~ msgstr "Rekening van schuldeiser"
356
357#~ msgid "Payment orders"
358#~ msgstr "Betaalopdrachten"
359
360#~ msgid "Generated SEPA Credit Transfer files"
361#~ msgstr "Gegenereerde SEPA overschrijfbestanden"
362
363#~ msgid "SEPA XML file generation"
364#~ msgstr "SEPA XML bestand generatie"
365
366#~ msgid "Reference for further communication"
367#~ msgstr "Referentie voor verdere communicatie"
368
369#~ msgid "Processing details"
370#~ msgstr "Verwerkings details"
371
372#~ msgid "Borne by debtor"
373#~ msgstr "Rekening van schuldenaar"
374
375#~ msgid "Payment order"
376#~ msgstr "Betaalopdracht"
377
378#~ msgid "Following service level"
379#~ msgstr "Volg service level"
380
381#~ msgid "Charge bearer"
382#~ msgstr "Kostenverdeling"
383
384#~ msgid ""
385#~ "Shared : transaction charges on the sender side are to be borne by the "
386#~ "debtor, transaction charges on the receiver side are to be borne by the "
387#~ "creditor (most transfers use this). Borne by creditor : all transaction "
388#~ "charges are to be borne by the creditor. Borne by debtor : all transaction "
389#~ "charges are to be borne by the debtor. Following service level : transaction "
390#~ "charges are to be applied following the rules agreed in the service level "
391#~ "and/or scheme."
392#~ msgstr ""
393#~ "Gedeeld : De transactiekosten aan de verzender kant zijn voor de "
394#~ "schuldeiser, transactiekosten aan de ontvanger kant zijn voor de schuldenaar "
395#~ "(deze keuze wordt het meest gebruikt). Rekening van de schuldenaar: Alle "
396#~ "transactie kosten zijn voor rekening van de schuldenaar. Rekening van de "
397#~ "schuldeiser: Alle transactie kosten zijn voor rekening van de schuldeiser. "
398#~ "Volg service level: Transactie kosten worden toegepast volgens de "
399#~ "afgesporken regels in het service level en/of schema."
400
401#~ msgid "Batch booking"
402#~ msgstr "Batch boeking"
403
404#~ msgid "Generated SEPA Credit Transfer XML files"
405#~ msgstr "Gengenereerde SEPA XML overschrijf bestanden"
0406
=== added directory 'account_banking_sepa_credit_transfer/static'
=== added directory 'account_banking_sepa_credit_transfer/static/src'
=== added directory 'account_banking_sepa_credit_transfer/static/src/img'
=== added file 'account_banking_sepa_credit_transfer/static/src/img/icon.png'
1Binary files account_banking_sepa_credit_transfer/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and account_banking_sepa_credit_transfer/static/src/img/icon.png 2014-03-19 00:47:00 +0000 differ407Binary files account_banking_sepa_credit_transfer/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and account_banking_sepa_credit_transfer/static/src/img/icon.png 2014-03-19 00:47:00 +0000 differ
=== modified file 'account_banking_sepa_credit_transfer/wizard/__init__.py'
--- account_banking_sepa_credit_transfer/wizard/__init__.py 2013-05-15 20:09:21 +0000
+++ account_banking_sepa_credit_transfer/wizard/__init__.py 2014-03-19 00:47:00 +0000
@@ -20,4 +20,4 @@
20#20#
21##############################################################################21##############################################################################
2222
23import export_sepa23from . import export_sepa
2424
=== modified file 'account_banking_sepa_credit_transfer/wizard/export_sepa.py'
--- account_banking_sepa_credit_transfer/wizard/export_sepa.py 2013-10-14 14:43:35 +0000
+++ account_banking_sepa_credit_transfer/wizard/export_sepa.py 2014-03-19 00:47:00 +0000
@@ -21,51 +21,58 @@
21##############################################################################21##############################################################################
2222
2323
24from osv import osv, fields24from openerp.osv import orm, fields
25import base6425from openerp.tools.translate import _
26from datetime import datetime, timedelta26from openerp import netsvc
27from tools.translate import _
28import tools
29from lxml import etree27from lxml import etree
30import logging28
31import netsvc29
3230class banking_export_sepa_wizard(orm.TransientModel):
33_logger = logging.getLogger(__name__)
34
35
36class banking_export_sepa_wizard(osv.osv_memory):
37 _name = 'banking.export.sepa.wizard'31 _name = 'banking.export.sepa.wizard'
38 _description = 'Export SEPA Credit Transfer XML file'32 _inherit = ['banking.export.pain']
33 _description = 'Export SEPA Credit Transfer File'
34
39 _columns = {35 _columns = {
40 'state': fields.selection([('create', 'Create'), ('finish', 'Finish')],36 'state': fields.selection([
41 'State', readonly=True),37 ('create', 'Create'),
42 'msg_identification': fields.char('Message identification', size=35,38 ('finish', 'Finish'),
43 # Can't set required=True on the field because it blocks39 ], 'State', readonly=True),
44 # the launch of the wizard -> I set it as required in the view40 'batch_booking': fields.boolean(
45 help='This is the message identification of the entire SEPA XML file. 35 characters max.'),41 'Batch Booking',
46 'batch_booking': fields.boolean('Batch booking',42 help="If true, the bank statement will display only one debit "
47 help="If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file."),43 "line for all the wire transfers of the SEPA XML file ; if "
48 'prefered_exec_date': fields.date('Prefered execution date',44 "false, the bank statement will display one debit line per wire "
49 help='This is the date on which the file should be processed by the bank. Please keep in mind that banks only execute on working days and typically use a delay of two days between execution date and effective transfer date.'),45 "transfer of the SEPA XML file."),
50 'charge_bearer': fields.selection([46 'charge_bearer': fields.selection([
47 ('SLEV', 'Following Service Level'),
51 ('SHAR', 'Shared'),48 ('SHAR', 'Shared'),
52 ('CRED', 'Borne by creditor'),49 ('CRED', 'Borne by Creditor'),
53 ('DEBT', 'Borne by debtor'),50 ('DEBT', 'Borne by Debtor'),
54 ('SLEV', 'Following service level'),51 ], 'Charge Bearer', required=True,
55 ], 'Charge bearer', required=True,52 help="Following service level : transaction charges are to be "
56 help='Shared : transaction charges on the sender side are to be borne by the debtor, transaction charges on the receiver side are to be borne by the creditor (most transfers use this). Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor. Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme.'),53 "applied following the rules agreed in the service level and/or "
57 'nb_transactions': fields.related('file_id', 'nb_transactions',54 "scheme (SEPA Core messages must use this). Shared : transaction "
58 type='integer', string='Number of transactions', readonly=True),55 "charges on the debtor side are to be borne by the debtor, "
59 'total_amount': fields.related('file_id', 'total_amount', type='float',56 "transaction charges on the creditor side are to be borne by "
60 string='Total amount', readonly=True),57 "the creditor. Borne by creditor : all transaction charges are "
61 'file_id': fields.many2one('banking.export.sepa', 'SEPA XML file', readonly=True),58 "to be borne by the creditor. Borne by debtor : all transaction "
62 'file': fields.related('file_id', 'file', string="File", type='binary',59 "charges are to be borne by the debtor."),
60 'nb_transactions': fields.related(
61 'file_id', 'nb_transactions', type='integer',
62 string='Number of Transactions', readonly=True),
63 'total_amount': fields.related(
64 'file_id', 'total_amount', type='float', string='Total Amount',
63 readonly=True),65 readonly=True),
64 'filename': fields.related('file_id', 'filename', string="Filename",66 'file_id': fields.many2one(
65 type='char', size=256, readonly=True),67 'banking.export.sepa', 'SEPA XML File', readonly=True),
66 'payment_order_ids': fields.many2many('payment.order',68 'file': fields.related(
67 'wiz_sepa_payorders_rel', 'wizard_id', 'payment_order_id',69 'file_id', 'file', string="File", type='binary', readonly=True),
68 'Payment orders', readonly=True),70 'filename': fields.related(
71 'file_id', 'filename', string="Filename", type='char',
72 size=256, readonly=True),
73 'payment_order_ids': fields.many2many(
74 'payment.order', 'wiz_sepa_payorders_rel', 'wizard_id',
75 'payment_order_id', 'Payment Orders', readonly=True),
69 }76 }
7077
71 _defaults = {78 _defaults = {
@@ -73,46 +80,24 @@
73 'state': 'create',80 'state': 'create',
74 }81 }
7582
76
77 def _limit_size(self, cr, uid, field, max_size, context=None):
78 '''Limit size of strings to respect the PAIN standard'''
79 max_size = int(max_size)
80 return field[0:max_size]
81
82
83 def _validate_iban(self, cr, uid, iban, context=None):
84 '''if IBAN is valid, returns IBAN
85 if IBAN is NOT valid, raises an error message'''
86 partner_bank_obj = self.pool.get('res.partner.bank')
87 if partner_bank_obj.is_iban_valid(cr, uid, iban, context=context):
88 return iban.replace(' ', '')
89 else:
90 raise osv.except_osv(_('Error :'), _("This IBAN is not valid : %s") % iban)
91
92 def create(self, cr, uid, vals, context=None):83 def create(self, cr, uid, vals, context=None):
93 payment_order_ids = context.get('active_ids', [])84 payment_order_ids = context.get('active_ids', [])
94 vals.update({85 vals.update({
95 'payment_order_ids': [[6, 0, payment_order_ids]],86 'payment_order_ids': [[6, 0, payment_order_ids]],
96 })87 })
97 return super(banking_export_sepa_wizard, self).create(cr, uid,88 return super(banking_export_sepa_wizard, self).create(
98 vals, context=context)89 cr, uid, vals, context=context)
99
10090
101 def create_sepa(self, cr, uid, ids, context=None):91 def create_sepa(self, cr, uid, ids, context=None):
102 '''92 '''
103 Creates the SEPA Credit Transfer file. That's the important code !93 Creates the SEPA Credit Transfer file. That's the important code !
104 '''94 '''
105 payment_order_obj = self.pool.get('payment.order')95 if context is None:
10696 context = {}
107 sepa_export = self.browse(cr, uid, ids[0], context=context)97 sepa_export = self.browse(cr, uid, ids[0], context=context)
108
109 my_company_name = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name
110 my_company_iban = self._validate_iban(cr, uid, sepa_export.payment_order_ids[0].mode.bank_id.acc_number, context=context)
111 my_company_bic = sepa_export.payment_order_ids[0].mode.bank_id.bank.bic
112 #my_company_country_code = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.address[0].country_id.code
113 #my_company_city = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.address[0].city
114 #my_company_street1 = sepa_export.payment_order_ids[0].mode.bank_id.partner_id.address[0].street
115 pain_flavor = sepa_export.payment_order_ids[0].mode.type.code98 pain_flavor = sepa_export.payment_order_ids[0].mode.type.code
99 convert_to_ascii = \
100 sepa_export.payment_order_ids[0].mode.convert_to_ascii
116 if pain_flavor == 'pain.001.001.02':101 if pain_flavor == 'pain.001.001.02':
117 bic_xml_tag = 'BIC'102 bic_xml_tag = 'BIC'
118 name_maxsize = 70103 name_maxsize = 70
@@ -121,226 +106,193 @@
121 bic_xml_tag = 'BIC'106 bic_xml_tag = 'BIC'
122 # size 70 -> 140 for <Nm> with pain.001.001.03107 # size 70 -> 140 for <Nm> with pain.001.001.03
123 # BUT the European Payment Council, in the document108 # BUT the European Payment Council, in the document
124 # "SEPA Credit Transfer Scheme Customer-to-bank Implementation guidelines" v6.0109 # "SEPA Credit Transfer Scheme Customer-to-bank
125 # available on http://www.europeanpaymentscouncil.eu/knowledge_bank.cfm110 # Implementation guidelines" v6.0 available on
111 # http://www.europeanpaymentscouncil.eu/knowledge_bank.cfm
126 # says that 'Nm' should be limited to 70112 # says that 'Nm' should be limited to 70
127 # so we follow the "European Payment Council" and we put 70 and not 140113 # so we follow the "European Payment Council"
114 # and we put 70 and not 140
128 name_maxsize = 70115 name_maxsize = 70
129 root_xml_tag = 'CstmrCdtTrfInitn'116 root_xml_tag = 'CstmrCdtTrfInitn'
130 elif pain_flavor == 'pain.001.001.04':117 elif pain_flavor == 'pain.001.001.04':
131 bic_xml_tag = 'BICFI'118 bic_xml_tag = 'BICFI'
132 name_maxsize = 140119 name_maxsize = 140
133 root_xml_tag = 'CstmrCdtTrfInitn'120 root_xml_tag = 'CstmrCdtTrfInitn'
134 else:121 elif pain_flavor == 'pain.001.001.05':
135 raise osv.except_osv(_('Error :'), _("Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03' and 'pain.001.001.04'.") % pain_flavor)122 bic_xml_tag = 'BICFI'
136 if sepa_export.batch_booking:123 name_maxsize = 140
137 my_batch_booking = 'true'124 root_xml_tag = 'CstmrCdtTrfInitn'
138 else:125
139 my_batch_booking = 'false'126 else:
140 my_msg_identification = sepa_export.msg_identification127 raise orm.except_orm(
141 if sepa_export.prefered_exec_date:128 _('Error:'),
142 my_requested_exec_date = sepa_export.prefered_exec_date129 _("Payment Type Code '%s' is not supported. The only "
143 else:130 "Payment Type Codes supported for SEPA Credit Transfers "
144 my_requested_exec_date = datetime.strftime(datetime.today() + timedelta(days=1), '%Y-%m-%d')131 "are 'pain.001.001.02', 'pain.001.001.03', "
132 "'pain.001.001.04' and 'pain.001.001.05'.")
133 % pain_flavor)
134
135 gen_args = {
136 'bic_xml_tag': bic_xml_tag,
137 'name_maxsize': name_maxsize,
138 'convert_to_ascii': convert_to_ascii,
139 'pain_flavor': pain_flavor,
140 'sepa_export': sepa_export,
141 'file_obj': self.pool['banking.export.sepa'],
142 'pain_xsd_file':
143 'account_banking_sepa_credit_transfer/data/%s.xsd'
144 % pain_flavor,
145 }
145146
146 pain_ns = {147 pain_ns = {
147 'xsi': 'http://www.w3.org/2001/XMLSchema-instance',148 'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
148 None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor,149 None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor,
149 }150 }
150151
151 root = etree.Element('Document', nsmap=pain_ns)152 xml_root = etree.Element('Document', nsmap=pain_ns)
152 pain_root = etree.SubElement(root, root_xml_tag)153 pain_root = etree.SubElement(xml_root, root_xml_tag)
154 pain_03_to_05 = \
155 ['pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05']
156
153 # A. Group header157 # A. Group header
154 group_header = etree.SubElement(pain_root, 'GrpHdr')158 group_header_1_0, nb_of_transactions_1_6, control_sum_1_7 = \
155 message_identification = etree.SubElement(group_header, 'MsgId')159 self.generate_group_header_block(
156 message_identification.text = self._limit_size(cr, uid, my_msg_identification, 35, context=context)160 cr, uid, pain_root, gen_args, context=context)
157 creation_date_time = etree.SubElement(group_header, 'CreDtTm')
158 creation_date_time.text = datetime.strftime(datetime.today(), '%Y-%m-%dT%H:%M:%S')
159 if pain_flavor == 'pain.001.001.02':
160 # batch_booking is in "Group header" with pain.001.001.02
161 # and in "Payment info" in pain.001.001.03/04
162 batch_booking = etree.SubElement(group_header, 'BtchBookg')
163 batch_booking.text = my_batch_booking
164 nb_of_transactions_grphdr = etree.SubElement(group_header, 'NbOfTxs')
165 control_sum_grphdr = etree.SubElement(group_header, 'CtrlSum')
166 # Grpg removed in pain.001.001.03
167 if pain_flavor == 'pain.001.001.02':
168 grouping = etree.SubElement(group_header, 'Grpg')
169 grouping.text = 'GRPD'
170 initiating_party = etree.SubElement(group_header, 'InitgPty')
171 initiating_party_name = etree.SubElement(initiating_party, 'Nm')
172 initiating_party_name.text = self._limit_size(cr, uid, my_company_name, name_maxsize, context=context)
173 # B. Payment info
174 payment_info = etree.SubElement(pain_root, 'PmtInf')
175 payment_info_identification = etree.SubElement(payment_info, 'PmtInfId')
176 payment_info_identification.text = self._limit_size(cr, uid, my_msg_identification, 35, context=context)
177 payment_method = etree.SubElement(payment_info, 'PmtMtd')
178 payment_method.text = 'TRF'
179 if pain_flavor in ['pain.001.001.03', 'pain.001.001.04']:
180 # batch_booking is in "Group header" with pain.001.001.02
181 # and in "Payment info" in pain.001.001.03/04
182 batch_booking = etree.SubElement(payment_info, 'BtchBookg')
183 batch_booking.text = my_batch_booking
184 # It may seem surprising, but the
185 # "SEPA Credit Transfer Scheme Customer-to-bank Implementation guidelines"
186 # v6.0 says that control sum and nb_of_transactions should be present
187 # at both "group header" level and "payment info" level
188 # This seems to be confirmed by the tests carried out at
189 # BNP Paribas in PAIN v001.001.03
190 if pain_flavor in ['pain.001.001.03', 'pain.001.001.04']:
191 nb_of_transactions_pmtinf = etree.SubElement(payment_info, 'NbOfTxs')
192 control_sum_pmtinf = etree.SubElement(payment_info, 'CtrlSum')
193 payment_type_info = etree.SubElement(payment_info, 'PmtTpInf')
194 service_level = etree.SubElement(payment_type_info, 'SvcLvl')
195 service_level_code = etree.SubElement(service_level, 'Cd')
196 service_level_code.text = 'SEPA'
197 requested_exec_date = etree.SubElement(payment_info, 'ReqdExctnDt')
198 requested_exec_date.text = my_requested_exec_date
199 debtor = etree.SubElement(payment_info, 'Dbtr')
200 debtor_name = etree.SubElement(debtor, 'Nm')
201 debtor_name.text = self._limit_size(cr, uid, my_company_name, name_maxsize, context=context)
202# debtor_address = etree.SubElement(debtor, 'PstlAdr')
203# debtor_street = etree.SubElement(debtor_address, 'AdrLine')
204# debtor_street.text = my_company_street1
205# debtor_city = etree.SubElement(debtor_address, 'AdrLine')
206# debtor_city.text = my_company_city
207# debtor_country = etree.SubElement(debtor_address, 'Ctry')
208# debtor_country.text = my_company_country_code
209 debtor_account = etree.SubElement(payment_info, 'DbtrAcct')
210 debtor_account_id = etree.SubElement(debtor_account, 'Id')
211 debtor_account_iban = etree.SubElement(debtor_account_id, 'IBAN')
212 debtor_account_iban.text = my_company_iban
213 debtor_agent = etree.SubElement(payment_info, 'DbtrAgt')
214 debtor_agent_institution = etree.SubElement(debtor_agent, 'FinInstnId')
215 if my_company_bic:
216 debtor_agent_bic = etree.SubElement(debtor_agent_institution, bic_xml_tag)
217 debtor_agent_bic.text = my_company_bic
218 charge_bearer = etree.SubElement(payment_info, 'ChrgBr')
219 charge_bearer.text = sepa_export.charge_bearer
220161
221 transactions_count = 0162 transactions_count_1_6 = 0
222 total_amount = 0.0163 total_amount = 0.0
223 amount_control_sum = 0.0164 amount_control_sum_1_7 = 0.0
224 # Iterate on payment orders165 lines_per_group = {}
166 # key = (requested_date, priority)
167 # values = list of lines as object
168 today = fields.date.context_today(self, cr, uid, context=context)
225 for payment_order in sepa_export.payment_order_ids:169 for payment_order in sepa_export.payment_order_ids:
226 total_amount = total_amount + payment_order.total170 total_amount = total_amount + payment_order.total
227 # Iterate each payment lines
228 for line in payment_order.line_ids:171 for line in payment_order.line_ids:
229 transactions_count += 1172 priority = line.priority
173 if payment_order.date_prefered == 'due':
174 requested_date = line.ml_maturity_date or today
175 elif payment_order.date_prefered == 'fixed':
176 requested_date = payment_order.date_scheduled or today
177 else:
178 requested_date = today
179 key = (requested_date, priority)
180 if key in lines_per_group:
181 lines_per_group[key].append(line)
182 else:
183 lines_per_group[key] = [line]
184 # Write requested_date on 'Payment date' of the pay line
185 if requested_date != line.date:
186 self.pool['payment.line'].write(
187 cr, uid, line.id,
188 {'date': requested_date}, context=context)
189
190 for (requested_date, priority), lines in lines_per_group.items():
191 # B. Payment info
192 payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5 = \
193 self.generate_start_payment_info_block(
194 cr, uid, pain_root,
195 "sepa_export.payment_order_ids[0].reference + '-' "
196 "+ requested_date.replace('-', '') + '-' + priority",
197 priority, False, False, requested_date, {
198 'sepa_export': sepa_export,
199 'priority': priority,
200 'requested_date': requested_date,
201 }, gen_args, context=context)
202
203 self.generate_party_block(
204 cr, uid, payment_info_2_0, 'Dbtr', 'B',
205 'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.'
206 'name',
207 'sepa_export.payment_order_ids[0].mode.bank_id.acc_number',
208 'sepa_export.payment_order_ids[0].mode.bank_id.bank.bic',
209 {'sepa_export': sepa_export},
210 gen_args, context=context)
211
212 charge_bearer_2_24 = etree.SubElement(payment_info_2_0, 'ChrgBr')
213 charge_bearer_2_24.text = sepa_export.charge_bearer
214
215 transactions_count_2_4 = 0
216 amount_control_sum_2_5 = 0.0
217 for line in lines:
218 transactions_count_1_6 += 1
219 transactions_count_2_4 += 1
230 # C. Credit Transfer Transaction Info220 # C. Credit Transfer Transaction Info
231 credit_transfer_transaction_info = etree.SubElement(payment_info, 'CdtTrfTxInf')221 credit_transfer_transaction_info_2_27 = etree.SubElement(
232 payment_identification = etree.SubElement(credit_transfer_transaction_info, 'PmtId')222 payment_info_2_0, 'CdtTrfTxInf')
233 instruction_identification = etree.SubElement(payment_identification, 'InstrId')223 payment_identification_2_28 = etree.SubElement(
234 instruction_identification.text = self._limit_size(cr, uid, line.communication, 35, context=context) #otherwise, we can reach the invoice fields via ml_inv_ref224 credit_transfer_transaction_info_2_27, 'PmtId')
235 end2end_identification = etree.SubElement(payment_identification, 'EndToEndId')225 end2end_identification_2_30 = etree.SubElement(
236 end2end_identification.text = self._limit_size(cr, uid, line.communication, 35, context=context)226 payment_identification_2_28, 'EndToEndId')
237 amount = etree.SubElement(credit_transfer_transaction_info, 'Amt')227 end2end_identification_2_30.text = self._prepare_field(
238 instructed_amount = etree.SubElement(amount, 'InstdAmt', Ccy=line.currency.name)228 cr, uid, 'End to End Identification', 'line.name',
239 instructed_amount.text = '%.2f' % line.amount_currency229 {'line': line}, 35, gen_args=gen_args,
240 amount_control_sum += line.amount_currency230 context=context)
241 creditor_agent = etree.SubElement(credit_transfer_transaction_info, 'CdtrAgt')231 currency_name = self._prepare_field(
242 creditor_agent_institution = etree.SubElement(creditor_agent, 'FinInstnId')232 cr, uid, 'Currency Code', 'line.currency.name',
233 {'line': line}, 3, gen_args=gen_args,
234 context=context)
235 amount_2_42 = etree.SubElement(
236 credit_transfer_transaction_info_2_27, 'Amt')
237 instructed_amount_2_43 = etree.SubElement(
238 amount_2_42, 'InstdAmt', Ccy=currency_name)
239 instructed_amount_2_43.text = '%.2f' % line.amount_currency
240 amount_control_sum_1_7 += line.amount_currency
241 amount_control_sum_2_5 += line.amount_currency
242
243 if not line.bank_id:243 if not line.bank_id:
244 raise osv.except_osv(_('Error :'), _("Missing Bank Account on invoice '%s' (payment order line reference '%s').") %(line.ml_inv_ref.number, line.name))244 raise orm.except_orm(
245 if line.bank_id.bank.bic:245 _('Error:'),
246 creditor_agent_bic = etree.SubElement(creditor_agent_institution, bic_xml_tag)246 _("Missing Bank Account on invoice '%s' (payment "
247 creditor_agent_bic.text = line.bank_id.bank.bic247 "order line reference '%s').")
248 creditor = etree.SubElement(credit_transfer_transaction_info, 'Cdtr')248 % (line.ml_inv_ref.number, line.name))
249 creditor_name = etree.SubElement(creditor, 'Nm')249 self.generate_party_block(
250 creditor_name.text = self._limit_size(cr, uid, line.partner_id.name, name_maxsize, context=context)250 cr, uid, credit_transfer_transaction_info_2_27, 'Cdtr',
251# I don't think they want it251 'C', 'line.partner_id.name', 'line.bank_id.acc_number',
252# If they want it, we need to implement full spec p26 appendix252 'line.bank_id.bank.bic', {'line': line}, gen_args,
253# creditor_address = etree.SubElement(creditor, 'PstlAdr')253 context=context)
254# creditor_street = etree.SubElement(creditor_address, 'AdrLine')254
255# creditor_street.text = line.partner_id.address[0].street255 self.generate_remittance_info_block(
256# creditor_city = etree.SubElement(creditor_address, 'AdrLine')256 cr, uid, credit_transfer_transaction_info_2_27,
257# creditor_city.text = line.partner_id.address[0].city257 line, gen_args, context=context)
258# creditor_country = etree.SubElement(creditor_address, 'Ctry')258
259# creditor_country.text = line.partner_id.address[0].country_id.code259 if pain_flavor in pain_03_to_05:
260 creditor_account = etree.SubElement(credit_transfer_transaction_info, 'CdtrAcct')260 nb_of_transactions_2_4.text = str(transactions_count_2_4)
261 creditor_account_id = etree.SubElement(creditor_account, 'Id')261 control_sum_2_5.text = '%.2f' % amount_control_sum_2_5
262 creditor_account_iban = etree.SubElement(creditor_account_id, 'IBAN')262
263 creditor_account_iban.text = self._validate_iban(cr, uid, line.bank_id.acc_number, context=context)263 if pain_flavor in pain_03_to_05:
264 remittance_info = etree.SubElement(credit_transfer_transaction_info, 'RmtInf')264 nb_of_transactions_1_6.text = str(transactions_count_1_6)
265 # switch to Structured (Strdr) ? If we do it, beware that the format is not the same between pain 02 and pain 03265 control_sum_1_7.text = '%.2f' % amount_control_sum_1_7
266 remittance_info_unstructured = etree.SubElement(remittance_info, 'Ustrd')
267 remittance_info_unstructured.text = self._limit_size(cr, uid, line.communication, 140, context=context)
268
269 if pain_flavor in ['pain.001.001.03', 'pain.001.001.04']:
270 nb_of_transactions_grphdr.text = nb_of_transactions_pmtinf.text = str(transactions_count)
271 control_sum_grphdr.text = control_sum_pmtinf.text = '%.2f' % amount_control_sum
272 else:266 else:
273 nb_of_transactions_grphdr.text = str(transactions_count)267 nb_of_transactions_1_6.text = str(transactions_count_1_6)
274 control_sum_grphdr.text = '%.2f' % amount_control_sum268 control_sum_1_7.text = '%.2f' % amount_control_sum_1_7
275269
276270 return self.finalize_sepa_file_creation(
277 xml_string = etree.tostring(root, pretty_print=True, encoding='UTF-8', xml_declaration=True)271 cr, uid, ids, xml_root, total_amount, transactions_count_1_6,
278 _logger.debug("Generated SEPA XML file below")272 gen_args, context=context)
279 _logger.debug(xml_string)
280 official_pain_schema = etree.XMLSchema(etree.parse(tools.file_open('account_banking_sepa_credit_transfer/data/%s.xsd' % pain_flavor)))
281
282 try:
283 root_to_validate = etree.fromstring(xml_string)
284 official_pain_schema.assertValid(root_to_validate)
285 except Exception, e:
286 _logger.warning("The XML file is invalid against the XML Schema Definition")
287 _logger.warning(xml_string)
288 _logger.warning(e)
289 raise osv.except_osv(_('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))
290
291 # CREATE the banking.export.sepa record
292 file_id = self.pool.get('banking.export.sepa').create(cr, uid,
293 {
294 'msg_identification': my_msg_identification,
295 'batch_booking': sepa_export.batch_booking,
296 'charge_bearer': sepa_export.charge_bearer,
297 'prefered_exec_date': sepa_export.prefered_exec_date,
298 'total_amount': total_amount,
299 'nb_transactions': transactions_count,
300 'file': base64.encodestring(xml_string),
301 'payment_order_ids': [
302 (6, 0, [x.id for x in sepa_export.payment_order_ids])
303 ],
304 }, context=context)
305
306 self.write(cr, uid, ids, {
307 'file_id': file_id,
308 'state': 'finish',
309 }, context=context)
310
311 action = {
312 'name': 'SEPA XML',
313 'type': 'ir.actions.act_window',
314 'view_type': 'form',
315 'view_mode': 'form,tree',
316 'res_model': self._name,
317 'res_id': ids[0],
318 'target': 'new',
319 }
320 return action
321
322273
323 def cancel_sepa(self, cr, uid, ids, context=None):274 def cancel_sepa(self, cr, uid, ids, context=None):
324 '''275 '''
325 Cancel the SEPA PAIN: just drop the file276 Cancel the SEPA file: just drop the file
326 '''277 '''
327 sepa_export = self.browse(cr, uid, ids[0], context=context)278 sepa_export = self.browse(cr, uid, ids[0], context=context)
328 self.pool.get('banking.export.sepa').unlink(cr, uid, sepa_export.file_id.id, context=context)279 self.pool.get('banking.export.sepa').unlink(
280 cr, uid, sepa_export.file_id.id, context=context)
329 return {'type': 'ir.actions.act_window_close'}281 return {'type': 'ir.actions.act_window_close'}
330282
331
332 def save_sepa(self, cr, uid, ids, context=None):283 def save_sepa(self, cr, uid, ids, context=None):
333 '''284 '''
334 Save the SEPA PAIN: mark all payments in the file as 'sent'.285 Save the SEPA file: send the done signal to all payment
286 orders in the file. With the default workflow, they will
287 transition to 'done', while with the advanced workflow in
288 account_banking_payment they will transition to 'sent' waiting
289 reconciliation.
335 '''290 '''
336 sepa_export = self.browse(cr, uid, ids[0], context=context)291 sepa_export = self.browse(cr, uid, ids[0], context=context)
337 sepa_file = self.pool.get('banking.export.sepa').write(cr, uid,292 self.pool.get('banking.export.sepa').write(
338 sepa_export.file_id.id, {'state': 'sent'}, context=context)293 cr, uid, sepa_export.file_id.id, {'state': 'sent'},
294 context=context)
339 wf_service = netsvc.LocalService('workflow')295 wf_service = netsvc.LocalService('workflow')
340 for order in sepa_export.payment_order_ids:296 for order in sepa_export.payment_order_ids:
341 wf_service.trg_validate(uid, 'payment.order', order.id, 'sent', cr)297 wf_service.trg_validate(uid, 'payment.order', order.id, 'sent', cr)
342 return {'type': 'ir.actions.act_window_close'}298 return {'type': 'ir.actions.act_window_close'}
343
344
345banking_export_sepa_wizard()
346
347299
=== modified file 'account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml'
--- account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml 2013-05-23 13:11:42 +0000
+++ account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml 2014-03-19 00:47:00 +0000
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<!--2<!--
3 Copyright (C) 2010-2012 Akretion (http://www.akretion.com)3 Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
4 @author: Alexis de Lattre <alexis.delattre@akretion.com>4 @author: Alexis de Lattre <alexis.delattre@akretion.com>
5 The licence is in the file __openerp__.py5 The licence is in the file __openerp__.py
6-->6-->
@@ -12,33 +12,21 @@
12 <field name="model">banking.export.sepa.wizard</field>12 <field name="model">banking.export.sepa.wizard</field>
13 <field name="type">form</field>13 <field name="type">form</field>
14 <field name="arch" type="xml">14 <field name="arch" type="xml">
15 <form string="SEPA XML file generation">15 <form string="SEPA File Generation">
16 <field name="state" invisible="True"/>16 <field name="state" invisible="True"/>
17 <group states="create">17 <group states="create" col="2" colspan="2">
18 <separator colspan="4" string="Processing details" />
19 <field name="batch_booking" />18 <field name="batch_booking" />
20 <field name="prefered_exec_date" />
21 <field name="charge_bearer" />19 <field name="charge_bearer" />
22 <separator colspan="4" string="Reference for further communication" />20 <button icon="gtk-close" string="Cancel" special="cancel"/>
23 <field name="msg_identification" required="True" />21 <button icon="gtk-ok" string="Generate" name="create_sepa" type="object"/>
24 <newline />
25 <button icon="gtk-close" special="cancel" string="Cancel" colspan="2"/>
26 <button icon="gtk-ok" string="Generate" name="create_sepa" type="object" colspan="2"/>
27 </group>22 </group>
28 <group states="finish">23 <group states="finish" col="2" colspan="2">
29 <field name="total_amount" />24 <field name="total_amount" />
30 <!-- Don't display this field, to avoid this bug :25 <field name="nb_transactions" />
31 https://bugs.launchpad.net/openobject-client-web/+bug/718989
32 Bug desc : in the Gtk client, you have to clic twice on the
33 "Create" button.
34 <field name="nb_transactions" /> -->
35 <newline />
36 <field name="file_id" />
37 <field name="file" filename="filename" />26 <field name="file" filename="filename" />
38 <field name="filename" invisible="True"/>27 <field name="filename" invisible="True"/>
39 <newline />28 <button icon="gtk-cancel" string="Cancel" name="cancel_sepa" type="object"/>
40 <button icon="gtk-cancel" string="Cancel" name="cancel_sepa" type="object" colspan="2"/>29 <button icon="gtk-ok" string="Validate" name="save_sepa" type="object"/>
41 <button icon="gtk-ok" string="Validate" name="save_sepa" type="object" colspan="2"/>
42 </group>30 </group>
43 </form>31 </form>
44 </field>32 </field>
4533
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,25 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# SEPA Direct Debit module for OpenERP
5# Copyright (C) 2013 Akretion (http://www.akretion.com)
6# @author: Alexis de Lattre <alexis.delattre@akretion.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23from . import company
24from . import wizard
25from . import account_banking_sdd
026
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,61 @@
1##############################################################################
2#
3# SEPA Direct Debit module for OpenERP
4# Copyright (C) 2013 Akretion (http://www.akretion.com)
5# @author: Alexis de Lattre <alexis.delattre@akretion.com>
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21{
22 'name': 'Account Banking SEPA Direct Debit',
23 'summary': 'Create SEPA files for Direct Debit',
24 'version': '0.1',
25 'license': 'AGPL-3',
26 'author': 'Akretion',
27 'website': 'http://www.akretion.com',
28 'category': 'Banking addons',
29 'depends': ['account_direct_debit', 'account_banking_pain_base'],
30 'external_dependencies': {
31 'python': ['unidecode', 'lxml'],
32 },
33 'data': [
34 'security/original_mandate_required_security.xml',
35 'account_banking_sdd_view.xml',
36 'sdd_mandate_view.xml',
37 'res_partner_bank_view.xml',
38 'account_payment_view.xml',
39 'company_view.xml',
40 'mandate_expire_cron.xml',
41 'account_invoice_view.xml',
42 'wizard/export_sdd_view.xml',
43 'data/payment_type_sdd.xml',
44 'data/mandate_reference_sequence.xml',
45 'security/ir.model.access.csv',
46 ],
47 'description': '''
48Module to export direct debit payment orders in SEPA XML file format.
49
50SEPA 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.
51
52The 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.
53
54This module uses the framework provided by the banking addons, cf https://launchpad.net/banking-addons
55
56Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
57 ''',
58 'active': False,
59 'installable': True,
60 'application': True,
61}
062
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,396 @@
1##############################################################################
2#
3# SEPA Direct Debit module for OpenERP
4# Copyright (C) 2013 Akretion (http://www.akretion.com)
5# @author: Alexis de Lattre <alexis.delattre@akretion.com>
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from openerp.osv import orm, fields
23from openerp.tools.translate import _
24import decimal_precision as dp
25from unidecode import unidecode
26from datetime import datetime
27from dateutil.relativedelta import relativedelta
28import logging
29
30NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY = 36
31
32logger = logging.getLogger(__name__)
33
34
35class banking_export_sdd(orm.Model):
36 '''SEPA Direct Debit export'''
37 _name = 'banking.export.sdd'
38 _description = __doc__
39 _rec_name = 'filename'
40
41 def _generate_filename(self, cr, uid, ids, name, arg, context=None):
42 res = {}
43 for sepa_file in self.browse(cr, uid, ids, context=context):
44 ref = sepa_file.payment_order_ids[0].reference
45 if ref:
46 label = unidecode(ref.replace('/', '-'))
47 else:
48 label = 'error'
49 res[sepa_file.id] = 'sdd_%s.xml' % label
50 return res
51
52 _columns = {
53 'payment_order_ids': fields.many2many(
54 'payment.order',
55 'account_payment_order_sdd_rel',
56 'banking_export_sepa_id', 'account_order_id',
57 'Payment Orders',
58 readonly=True),
59 'nb_transactions': fields.integer(
60 'Number of Transactions', readonly=True),
61 'total_amount': fields.float(
62 'Total Amount', digits_compute=dp.get_precision('Account'),
63 readonly=True),
64 'batch_booking': fields.boolean(
65 'Batch Booking', readonly=True,
66 help="If true, the bank statement will display only one credit "
67 "line for all the direct debits of the SEPA file ; if false, "
68 "the bank statement will display one credit line per direct "
69 "debit of the SEPA file."),
70 'charge_bearer': fields.selection([
71 ('SLEV', 'Following Service Level'),
72 ('SHAR', 'Shared'),
73 ('CRED', 'Borne by Creditor'),
74 ('DEBT', 'Borne by Debtor'),
75 ], 'Charge Bearer', readonly=True,
76 help="Following service level : transaction charges are to be "
77 "applied following the rules agreed in the service level and/or "
78 "scheme (SEPA Core messages must use this). Shared : "
79 "transaction charges on the creditor side are to be borne by "
80 "the creditor, transaction charges on the debtor side are to be "
81 "borne by the debtor. Borne by creditor : all transaction "
82 "charges are to be borne by the creditor. Borne by debtor : "
83 "all transaction charges are to be borne by the debtor."),
84 'create_date': fields.datetime('Generation Date', readonly=True),
85 'file': fields.binary('SEPA File', readonly=True),
86 'filename': fields.function(
87 _generate_filename, type='char', size=256,
88 string='Filename', readonly=True, store=True),
89 'state': fields.selection([
90 ('draft', 'Draft'),
91 ('sent', 'Sent'),
92 ('done', 'Reconciled'),
93 ], 'State', readonly=True),
94 }
95
96 _defaults = {
97 'state': 'draft',
98 }
99
100
101class sdd_mandate(orm.Model):
102 '''SEPA Direct Debit Mandate'''
103 _name = 'sdd.mandate'
104 _description = __doc__
105 _rec_name = 'unique_mandate_reference'
106 _order = 'signature_date desc'
107
108 _columns = {
109 'partner_bank_id': fields.many2one(
110 'res.partner.bank', 'Bank Account'),
111 'partner_id': fields.related(
112 'partner_bank_id', 'partner_id', type='many2one',
113 relation='res.partner', string='Partner', readonly=True),
114 'company_id': fields.many2one('res.company', 'Company', required=True),
115 'unique_mandate_reference': fields.char(
116 'Unique Mandate Reference', size=35, readonly=True),
117 'type': fields.selection([
118 ('recurrent', 'Recurrent'),
119 ('oneoff', 'One-Off'),
120 ], 'Type of Mandate', required=True),
121 'recurrent_sequence_type': fields.selection([
122 ('first', 'First'),
123 ('recurring', 'Recurring'),
124 ('final', 'Final'),
125 ], 'Sequence Type for Next Debit',
126 help="This field is only used for Recurrent mandates, not for "
127 "One-Off mandates."),
128 'signature_date': fields.date(
129 'Date of Signature of the Mandate'),
130 'scan': fields.binary('Scan of the Mandate'),
131 'last_debit_date': fields.date(
132 'Date of the Last Debit', readonly=True),
133 'state': fields.selection([
134 ('draft', 'Draft'),
135 ('valid', 'Valid'),
136 ('expired', 'Expired'),
137 ('cancel', 'Cancelled'),
138 ], 'Status',
139 help="Only valid mandates can be used in a payment line. A "
140 "cancelled mandate is a mandate that has been cancelled by "
141 "the customer. A one-off mandate expires after its first use. "
142 "A recurrent mandate expires after it's final use or if it "
143 "hasn't been used for 36 months."),
144 'payment_line_ids': fields.one2many(
145 'payment.line', 'sdd_mandate_id', "Related Payment Lines"),
146 'sepa_migrated': fields.boolean(
147 'Migrated to SEPA',
148 help="If this field is not active, the mandate section of the "
149 "next direct debit file that include this mandate will contain "
150 "the 'Original Mandate Identification' and the 'Original "
151 "Creditor Scheme Identification'. This is required in a few "
152 "countries (Belgium for instance), but not in all countries. "
153 "If this is not required in your country, you should keep this "
154 "field always active."),
155 'original_mandate_identification': fields.char(
156 'Original Mandate Identification', size=35,
157 help="When the field 'Migrated to SEPA' is not active, this "
158 "field will be used as the Original Mandate Identification in "
159 "the Direct Debit file."),
160 }
161
162 _defaults = {
163 'company_id': lambda self, cr, uid, context:
164 self.pool['res.company']._company_default_get(
165 cr, uid, 'sdd.mandate', context=context),
166 'unique_mandate_reference': lambda self, cr, uid, ctx:
167 self.pool['ir.sequence'].get(cr, uid, 'sdd.mandate.reference'),
168 'state': 'draft',
169 'sepa_migrated': True,
170 }
171
172 _sql_constraints = [(
173 'mandate_ref_company_uniq',
174 'unique(unique_mandate_reference, company_id)',
175 'A Mandate with the same reference already exists for this company !'
176 )]
177
178 def _check_sdd_mandate(self, cr, uid, ids):
179 for mandate in self.browse(cr, uid, ids):
180 if (mandate.signature_date and
181 mandate.signature_date >
182 datetime.today().strftime('%Y-%m-%d')):
183 raise orm.except_orm(
184 _('Error:'),
185 _("The date of signature of mandate '%s' is in the "
186 "future !")
187 % mandate.unique_mandate_reference)
188 if mandate.state == 'valid' and not mandate.signature_date:
189 raise orm.except_orm(
190 _('Error:'),
191 _("Cannot validate the mandate '%s' without a date of "
192 "signature.")
193 % mandate.unique_mandate_reference)
194 if mandate.state == 'valid' and not mandate.partner_bank_id:
195 raise orm.except_orm(
196 _('Error:'),
197 _("Cannot validate the mandate '%s' because it is not "
198 "attached to a bank account.")
199 % mandate.unique_mandate_reference)
200
201 if (mandate.signature_date and mandate.last_debit_date and
202 mandate.signature_date > mandate.last_debit_date):
203 raise orm.except_orm(
204 _('Error:'),
205 _("The mandate '%s' can't have a date of last debit "
206 "before the date of signature.")
207 % mandate.unique_mandate_reference)
208 if (mandate.type == 'recurrent'
209 and not mandate.recurrent_sequence_type):
210 raise orm.except_orm(
211 _('Error:'),
212 _("The recurrent mandate '%s' must have a sequence type.")
213 % mandate.unique_mandate_reference)
214 if (mandate.type == 'recurrent' and not mandate.sepa_migrated
215 and mandate.recurrent_sequence_type != 'first'):
216 raise orm.except_orm(
217 _('Error:'),
218 _("The recurrent mandate '%s' which is not marked as "
219 "'Migrated to SEPA' must have its recurrent sequence "
220 "type set to 'First'.")
221 % mandate.unique_mandate_reference)
222 if (mandate.type == 'recurrent' and not mandate.sepa_migrated
223 and not mandate.original_mandate_identification):
224 raise orm.except_orm(
225 _('Error:'),
226 _("You must set the 'Original Mandate Identification' "
227 "on the recurrent mandate '%s' which is not marked "
228 "as 'Migrated to SEPA'.")
229 % mandate.unique_mandate_reference)
230 return True
231
232 _constraints = [
233 (_check_sdd_mandate, "Error msg in raise", [
234 'last_debit_date', 'signature_date', 'state', 'partner_bank_id',
235 'type', 'recurrent_sequence_type', 'sepa_migrated',
236 'original_mandate_identification',
237 ]),
238 ]
239
240 def mandate_type_change(self, cr, uid, ids, type):
241 if type == 'recurrent':
242 recurrent_sequence_type = 'first'
243 else:
244 recurrent_sequence_type = False
245 res = {'value': {'recurrent_sequence_type': recurrent_sequence_type}}
246 return res
247
248 def mandate_partner_bank_change(
249 self, cr, uid, ids, partner_bank_id, type, recurrent_sequence_type,
250 last_debit_date, state):
251 res = {'value': {}}
252 if partner_bank_id:
253 partner_bank_read = self.pool['res.partner.bank'].read(
254 cr, uid, partner_bank_id, ['partner_id'])['partner_id']
255 if partner_bank_read:
256 res['value']['partner_id'] = partner_bank_read[0]
257 if (state == 'valid' and partner_bank_id
258 and type == 'recurrent'
259 and recurrent_sequence_type != 'first'):
260 res['value']['recurrent_sequence_type'] = 'first'
261 res['warning'] = {
262 'title': _('Mandate update'),
263 'message': _(
264 "As you changed the bank account attached to this "
265 "mandate, the 'Sequence Type' has been set back to "
266 "'First'."),
267 }
268 return res
269
270 def validate(self, cr, uid, ids, context=None):
271 to_validate_ids = []
272 for mandate in self.browse(cr, uid, ids, context=context):
273 assert mandate.state == 'draft', 'Mandate should be in draft state'
274 to_validate_ids.append(mandate.id)
275 self.write(
276 cr, uid, to_validate_ids, {'state': 'valid'}, context=context)
277 return True
278
279 def cancel(self, cr, uid, ids, context=None):
280 to_cancel_ids = []
281 for mandate in self.browse(cr, uid, ids, context=context):
282 assert mandate.state in ('draft', 'valid'),\
283 'Mandate should be in draft or valid state'
284 to_cancel_ids.append(mandate.id)
285 self.write(
286 cr, uid, to_cancel_ids, {'state': 'cancel'}, context=context)
287 return True
288
289 def _sdd_mandate_set_state_to_expired(self, cr, uid, context=None):
290 logger.info('Searching for SDD Mandates that must be set to Expired')
291 expire_limit_date = datetime.today() + \
292 relativedelta(months=-NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY)
293 expire_limit_date_str = expire_limit_date.strftime('%Y-%m-%d')
294 expired_mandate_ids = self.search(cr, uid, [
295 '|',
296 ('last_debit_date', '=', False),
297 ('last_debit_date', '<=', expire_limit_date_str),
298 ('state', '=', 'valid'),
299 ('signature_date', '<=', expire_limit_date_str),
300 ], context=context)
301 if expired_mandate_ids:
302 self.write(
303 cr, uid, expired_mandate_ids, {'state': 'expired'},
304 context=context)
305 logger.info(
306 'The following SDD Mandate IDs has been set to expired: %s'
307 % expired_mandate_ids)
308 else:
309 logger.info('0 SDD Mandates must be set to Expired')
310 return True
311
312
313class res_partner_bank(orm.Model):
314 _inherit = 'res.partner.bank'
315
316 _columns = {
317 'sdd_mandate_ids': fields.one2many(
318 'sdd.mandate', 'partner_bank_id', 'SEPA Direct Debit Mandates'),
319 }
320
321
322class payment_line(orm.Model):
323 _inherit = 'payment.line'
324
325 _columns = {
326 'sdd_mandate_id': fields.many2one(
327 'sdd.mandate', 'SEPA Direct Debit Mandate',
328 domain=[('state', '=', 'valid')]),
329 }
330
331 def create(self, cr, uid, vals, context=None):
332 '''If the customer invoice has a mandate, take it
333 otherwise, take the first valid mandate of the bank account'''
334 if context is None:
335 context = {}
336 if not vals:
337 vals = {}
338 partner_bank_id = vals.get('bank_id')
339 move_line_id = vals.get('move_line_id')
340 if (context.get('default_payment_order_type') == 'debit'
341 and 'sdd_mandate_id' not in vals):
342 if move_line_id:
343 line = self.pool['account.move.line'].browse(
344 cr, uid, move_line_id, context=context)
345 if (line.invoice and line.invoice.type == 'out_invoice'
346 and line.invoice.sdd_mandate_id):
347 vals.update({
348 'sdd_mandate_id': line.invoice.sdd_mandate_id.id,
349 'bank_id':
350 line.invoice.sdd_mandate_id.partner_bank_id.id,
351 })
352 if partner_bank_id and 'sdd_mandate_id' not in vals:
353 mandate_ids = self.pool['sdd.mandate'].search(cr, uid, [
354 ('partner_bank_id', '=', partner_bank_id),
355 ('state', '=', 'valid'),
356 ], context=context)
357 if mandate_ids:
358 vals['sdd_mandate_id'] = mandate_ids[0]
359 return super(payment_line, self).create(cr, uid, vals, context=context)
360
361 def _check_mandate_bank_link(self, cr, uid, ids):
362 for payline in self.browse(cr, uid, ids):
363 if (payline.sdd_mandate_id and payline.bank_id
364 and payline.sdd_mandate_id.partner_bank_id.id !=
365 payline.bank_id.id):
366 raise orm.except_orm(
367 _('Error:'),
368 _("The payment line with reference '%s' has the bank "
369 "account '%s' which is not attached to the mandate "
370 "'%s' (this mandate is attached to the bank account "
371 "'%s').") % (
372 payline.name,
373 self.pool['res.partner.bank'].name_get(
374 cr, uid, [payline.bank_id.id])[0][1],
375 payline.sdd_mandate_id.unique_mandate_reference,
376 self.pool['res.partner.bank'].name_get(
377 cr, uid,
378 [payline.sdd_mandate_id.partner_bank_id.id])[0][1],
379 ))
380 return True
381
382 _constraints = [
383 (_check_mandate_bank_link, 'Error msg in raise',
384 ['sdd_mandate_id', 'bank_id']),
385 ]
386
387
388class account_invoice(orm.Model):
389 _inherit = 'account.invoice'
390
391 _columns = {
392 'sdd_mandate_id': fields.many2one(
393 'sdd.mandate', 'SEPA Direct Debit Mandate',
394 domain=[('state', '=', 'valid')], readonly=True,
395 states={'draft': [('readonly', False)]})
396 }
0397
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,82 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2013 Akretion (http://www.akretion.com)
4 @author: Alexis de Lattre <alexis.delattre@akretion.com>
5 The licence is in the file __openerp__.py
6-->
7<openerp>
8<data>
9
10<record id="view_banking_export_sdd_form" model="ir.ui.view">
11 <field name="name">account.banking.export.sdd.form</field>
12 <field name="model">banking.export.sdd</field>
13 <field name="type">form</field>
14 <field name="arch" type="xml">
15 <form string="SEPA Direct Debit">
16 <notebook>
17 <page string="General Information">
18 <field name="total_amount" />
19 <field name="nb_transactions" />
20 <field name="batch_booking" />
21 <field name="charge_bearer"/>
22 <field name="create_date" />
23 <newline />
24 <field name="file" filename="filename"/>
25 <field name="filename" invisible="True"/>
26 </page>
27 <page string="Payment Orders">
28 <field name="payment_order_ids" colspan="4" nolabel="1">
29 <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment Orders">
30 <field name="reference"/>
31 <field name="date_created"/>
32 <field name="date_done"/>
33 <field name="total"/>
34 <field name="state"/>
35 </tree>
36 </field>
37 </page>
38 </notebook>
39 </form>
40 </field>
41</record>
42
43
44<record id="view_banking_export_sdd_tree" model="ir.ui.view">
45 <field name="name">account.banking.export.sdd.tree</field>
46 <field name="model">banking.export.sdd</field>
47 <field name="type">tree</field>
48 <field name="arch" type="xml">
49 <tree string="SEPA Direct Debit">
50 <field name="filename"/>
51 <field name="create_date"/>
52 <field name="nb_transactions"/>
53 </tree>
54 </field>
55</record>
56
57
58<record id="action_account_banking_sdd" model="ir.actions.act_window">
59 <field name="name">SEPA Direct Debit Files</field>
60 <field name="res_model">banking.export.sdd</field>
61 <field name="view_type">form</field>
62 <field name="view_mode">tree,form</field>
63</record>
64
65
66<menuitem id="menu_account_banking_sdd"
67 parent="account_payment.menu_main_payment"
68 action="action_account_banking_sdd"
69 sequence="20"
70 />
71
72<act_window id="act_banking_export_sdd_payment_order"
73 name="Generated SEPA Direct Debit Files"
74 domain="[('payment_order_ids', '=', active_id)]"
75 res_model="banking.export.sdd"
76 src_model="payment.order"
77 view_type="form"
78 view_mode="tree,form"
79/>
80
81</data>
82</openerp>
083
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2013 Akretion (http://www.akretion.com)
4 @author: Alexis de Lattre <alexis.delattre@akretion.com>
5 The licence is in the file __openerp__.py
6-->
7<openerp>
8<data>
9
10<record id="invoice_form" model="ir.ui.view">
11 <field name="name">add.sdd.mandate.on.customer.invoice.form</field>
12 <field name="model">account.invoice</field>
13 <field name="inherit_id" ref="account.invoice_form"/>
14 <field name="arch" type="xml">
15 <field name="partner_bank_id" position="after">
16 <field name="sdd_mandate_id" domain="[('partner_id', '=', partner_id), ('state', '=', 'valid')]" attrs="{'invisible': [('type', '=', 'out_refund')]}"/>
17 </field>
18 </field>
19</record>
20
21</data>
22</openerp>
023
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,26 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2013 Akretion (http://www.akretion.com)
4 @author: Alexis de Lattre <alexis.delattre@akretion.com>
5 The licence is in the file __openerp__.py
6-->
7<openerp>
8<data>
9
10<record id="sdd_view_payment_order_form" model="ir.ui.view">
11 <field name="name">sdd.payment.order.form</field>
12 <field name="model">payment.order</field>
13 <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
14 <field name="arch" type="xml">
15 <xpath expr="//field[@name='line_ids']/form/notebook/page/field[@name='bank_id']" position="after">
16 <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}"/>
17 <newline />
18 </xpath>
19 <xpath expr="//field[@name='line_ids']/tree/field[@name='bank_id']" position="after">
20 <field name="sdd_mandate_id" string="SDD Mandate" invisible="context.get('default_payment_order_type')!='debit'"/>
21 </xpath>
22 </field>
23</record>
24
25</data>
26</openerp>
027
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,89 @@
1##############################################################################
2#
3# SEPA Direct Debit module for OpenERP
4# Copyright (C) 2013 Akretion (http://www.akretion.com)
5# @author: Alexis de Lattre <alexis.delattre@akretion.com>
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from openerp.osv import orm, fields
23import logging
24
25logger = logging.getLogger(__name__)
26
27
28class res_company(orm.Model):
29 _inherit = 'res.company'
30
31 _columns = {
32 'sepa_creditor_identifier': fields.char(
33 'SEPA Creditor Identifier', size=35,
34 help="Enter the Creditor Identifier that has been attributed "
35 "to your company to make SEPA Direct Debits. This identifier "
36 "is composed of :\n- your country ISO code (2 letters)\n- a "
37 "2-digits checkum\n- a 3-letters business code\n- a "
38 "country-specific identifier"),
39 'original_creditor_identifier': fields.char(
40 'Original Creditor Identifier', size=70),
41 }
42
43 def is_sepa_creditor_identifier_valid(
44 self, cr, uid, sepa_creditor_identifier, context=None):
45 """Check if SEPA Creditor Identifier is valid
46 @param sepa_creditor_identifier: SEPA Creditor Identifier as str
47 or unicode
48 @return: True if valid, False otherwise
49 """
50 if not isinstance(sepa_creditor_identifier, (str, unicode)):
51 return False
52 try:
53 sci_str = str(sepa_creditor_identifier)
54 except:
55 logger.warning(
56 "SEPA Creditor ID should contain only ASCII caracters.")
57 return False
58 sci = sci_str.lower()
59 if len(sci) < 9:
60 return False
61 before_replacement = sci[7:] + sci[0:2] + '00'
62 logger.debug(
63 "SEPA ID check before_replacement = %s" % before_replacement)
64 after_replacement = ''
65 for char in before_replacement:
66 if char.isalpha():
67 after_replacement += str(ord(char)-87)
68 else:
69 after_replacement += char
70 logger.debug(
71 "SEPA ID check after_replacement = %s" % after_replacement)
72 if int(sci[2:4]) == (98 - (int(after_replacement) % 97)):
73 return True
74 else:
75 return False
76
77 def _check_sepa_creditor_identifier(self, cr, uid, ids):
78 for company in self.browse(cr, uid, ids):
79 if company.sepa_creditor_identifier:
80 if not self.is_sepa_creditor_identifier_valid(
81 cr, uid, company.sepa_creditor_identifier):
82 return False
83 return True
84
85 _constraints = [
86 (_check_sepa_creditor_identifier,
87 "Invalid SEPA Creditor Identifier.",
88 ['sepa_creditor_identifier']),
89 ]
090
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,23 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2013 Akretion (http://www.akretion.com)
4 @author: Alexis de Lattre <alexis.delattre@akretion.com>
5 The licence is in the file __openerp__.py
6-->
7<openerp>
8<data>
9
10<record id="sdd_res_company_form" model="ir.ui.view">
11 <field name="name">sepa_direct_debit.res.company.form</field>
12 <field name="model">res.company</field>
13 <field name="inherit_id" ref="account_banking_pain_base.view_company_form"/>
14 <field name="arch" type="xml">
15 <group name="pain" position="inside">
16 <field name="sepa_creditor_identifier"/>
17 <field name="original_creditor_identifier" groups="account_banking_sepa_direct_debit.group_original_mandate_required"/>
18 </group>
19 </field>
20</record>
21
22</data>
23</openerp>
024
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,21 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data noupdate="1">
4
5
6<record id="sdd_mandate_seq_type" model="ir.sequence.type">
7 <field name="name">SDD Mandate Reference</field>
8 <field name="code">sdd.mandate.reference</field>
9</record>
10
11<record id="sdd_mandate_seq" model="ir.sequence">
12 <field name="name">SDD Mandate Reference</field>
13 <field name="code">sdd.mandate.reference</field>
14 <field name="prefix">RUM</field>
15 <field name="padding" eval="7"/>
16 <!-- remember that max size for the mandate ref is 35 -->
17</record>
18
19
20</data>
21</openerp>
022
=== 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 2014-03-19 00:47:00 +0000
@@ -0,0 +1,879 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!--Generated by SWIFTStandards Workstation (build:R6.1.0.2) on 2009 Jan 08 17:30:53-->
3<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">
4 <xs:element name="Document" type="Document"/>
5 <xs:complexType name="AccountIdentification4Choice">
6 <xs:sequence>
7 <xs:choice>
8 <xs:element name="IBAN" type="IBAN2007Identifier"/>
9 <xs:element name="Othr" type="GenericAccountIdentification1"/>
10 </xs:choice>
11 </xs:sequence>
12 </xs:complexType>
13 <xs:complexType name="AccountSchemeName1Choice">
14 <xs:sequence>
15 <xs:choice>
16 <xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
17 <xs:element name="Prtry" type="Max35Text"/>
18 </xs:choice>
19 </xs:sequence>
20 </xs:complexType>
21 <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
22 <xs:restriction base="xs:decimal">
23 <xs:minInclusive value="0"/>
24 <xs:fractionDigits value="5"/>
25 <xs:totalDigits value="18"/>
26 </xs:restriction>
27 </xs:simpleType>
28 <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
29 <xs:simpleContent>
30 <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
31 <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
32 </xs:extension>
33 </xs:simpleContent>
34 </xs:complexType>
35 <xs:simpleType name="ActiveOrHistoricCurrencyCode">
36 <xs:restriction base="xs:string">
37 <xs:pattern value="[A-Z]{3,3}"/>
38 </xs:restriction>
39 </xs:simpleType>
40 <xs:simpleType name="AddressType2Code">
41 <xs:restriction base="xs:string">
42 <xs:enumeration value="ADDR"/>
43 <xs:enumeration value="PBOX"/>
44 <xs:enumeration value="HOME"/>
45 <xs:enumeration value="BIZZ"/>
46 <xs:enumeration value="MLTO"/>
47 <xs:enumeration value="DLVY"/>
48 </xs:restriction>
49 </xs:simpleType>
50 <xs:complexType name="AmendmentInformationDetails6">
51 <xs:sequence>
52 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlMndtId" type="Max35Text"/>
53 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrSchmeId" type="PartyIdentification32"/>
54 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
55 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgtAcct" type="CashAccount16"/>
56 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtr" type="PartyIdentification32"/>
57 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAcct" type="CashAccount16"/>
58 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
59 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgtAcct" type="CashAccount16"/>
60 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFnlColltnDt" type="ISODate"/>
61 <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFrqcy" type="Frequency1Code"/>
62 </xs:sequence>
63 </xs:complexType>
64 <xs:simpleType name="AnyBICIdentifier">
65 <xs:restriction base="xs:string">
66 <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
67 </xs:restriction>
68 </xs:simpleType>
69 <xs:complexType name="Authorisation1Choice">
70 <xs:sequence>
71 <xs:choice>
72 <xs:element name="Cd" type="Authorisation1Code"/>
73 <xs:element name="Prtry" type="Max128Text"/>
74 </xs:choice>
75 </xs:sequence>
76 </xs:complexType>
77 <xs:simpleType name="Authorisation1Code">
78 <xs:restriction base="xs:string">
79 <xs:enumeration value="AUTH"/>
80 <xs:enumeration value="FDET"/>
81 <xs:enumeration value="FSUM"/>
82 <xs:enumeration value="ILEV"/>
83 </xs:restriction>
84 </xs:simpleType>
85 <xs:simpleType name="BICIdentifier">
86 <xs:restriction base="xs:string">
87 <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
88 </xs:restriction>
89 </xs:simpleType>
90 <xs:simpleType name="BatchBookingIndicator">
91 <xs:restriction base="xs:boolean"/>
92 </xs:simpleType>
93 <xs:complexType name="BranchAndFinancialInstitutionIdentification4">
94 <xs:sequence>
95 <xs:element name="FinInstnId" type="FinancialInstitutionIdentification7"/>
96 <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
97 </xs:sequence>
98 </xs:complexType>
99 <xs:complexType name="BranchData2">
100 <xs:sequence>
101 <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
102 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
103 <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
104 </xs:sequence>
105 </xs:complexType>
106 <xs:complexType name="CashAccount16">
107 <xs:sequence>
108 <xs:element name="Id" type="AccountIdentification4Choice"/>
109 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2"/>
110 <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
111 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
112 </xs:sequence>
113 </xs:complexType>
114 <xs:complexType name="CashAccountType2">
115 <xs:sequence>
116 <xs:choice>
117 <xs:element name="Cd" type="CashAccountType4Code"/>
118 <xs:element name="Prtry" type="Max35Text"/>
119 </xs:choice>
120 </xs:sequence>
121 </xs:complexType>
122 <xs:simpleType name="CashAccountType4Code">
123 <xs:restriction base="xs:string">
124 <xs:enumeration value="CASH"/>
125 <xs:enumeration value="CHAR"/>
126 <xs:enumeration value="COMM"/>
127 <xs:enumeration value="TAXE"/>
128 <xs:enumeration value="CISH"/>
129 <xs:enumeration value="TRAS"/>
130 <xs:enumeration value="SACC"/>
131 <xs:enumeration value="CACC"/>
132 <xs:enumeration value="SVGS"/>
133 <xs:enumeration value="ONDP"/>
134 <xs:enumeration value="MGLD"/>
135 <xs:enumeration value="NREX"/>
136 <xs:enumeration value="MOMA"/>
137 <xs:enumeration value="LOAN"/>
138 <xs:enumeration value="SLRY"/>
139 <xs:enumeration value="ODFT"/>
140 </xs:restriction>
141 </xs:simpleType>
142 <xs:complexType name="CategoryPurpose1Choice">
143 <xs:sequence>
144 <xs:choice>
145 <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
146 <xs:element name="Prtry" type="Max35Text"/>
147 </xs:choice>
148 </xs:sequence>
149 </xs:complexType>
150 <xs:simpleType name="ChargeBearerType1Code">
151 <xs:restriction base="xs:string">
152 <xs:enumeration value="DEBT"/>
153 <xs:enumeration value="CRED"/>
154 <xs:enumeration value="SHAR"/>
155 <xs:enumeration value="SLEV"/>
156 </xs:restriction>
157 </xs:simpleType>
158 <xs:complexType name="ClearingSystemIdentification2Choice">
159 <xs:sequence>
160 <xs:choice>
161 <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
162 <xs:element name="Prtry" type="Max35Text"/>
163 </xs:choice>
164 </xs:sequence>
165 </xs:complexType>
166 <xs:complexType name="ClearingSystemMemberIdentification2">
167 <xs:sequence>
168 <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
169 <xs:element name="MmbId" type="Max35Text"/>
170 </xs:sequence>
171 </xs:complexType>
172 <xs:complexType name="ContactDetails2">
173 <xs:sequence>
174 <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
175 <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
176 <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
177 <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
178 <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
179 <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
180 <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
181 </xs:sequence>
182 </xs:complexType>
183 <xs:simpleType name="CountryCode">
184 <xs:restriction base="xs:string">
185 <xs:pattern value="[A-Z]{2,2}"/>
186 </xs:restriction>
187 </xs:simpleType>
188 <xs:simpleType name="CreditDebitCode">
189 <xs:restriction base="xs:string">
190 <xs:enumeration value="CRDT"/>
191 <xs:enumeration value="DBIT"/>
192 </xs:restriction>
193 </xs:simpleType>
194 <xs:complexType name="CreditorReferenceInformation2">
195 <xs:sequence>
196 <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
197 <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
198 </xs:sequence>
199 </xs:complexType>
200 <xs:complexType name="CreditorReferenceType1Choice">
201 <xs:sequence>
202 <xs:choice>
203 <xs:element name="Cd" type="DocumentType3Code"/>
204 <xs:element name="Prtry" type="Max35Text"/>
205 </xs:choice>
206 </xs:sequence>
207 </xs:complexType>
208 <xs:complexType name="CreditorReferenceType2">
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches