Merge lp:~akretion-team/banking-addons/70-sepa-trf-dd-updates into lp:banking-addons
- 70-sepa-trf-dd-updates
- Merge into banking-addons-70
Status: | Merged |
---|---|
Merged at revision: | 219 |
Proposed branch: | lp:~akretion-team/banking-addons/70-sepa-trf-dd-updates |
Merge into: | lp:banking-addons |
Diff against target: |
8121 lines (+6854/-635) 51 files modified
account_banking_pain_base/__init__.py (+26/-0) account_banking_pain_base/__openerp__.py (+50/-0) account_banking_pain_base/banking_export_pain.py (+439/-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 (+41/-0) account_banking_pain_base/payment_mode.py (+39/-0) account_banking_pain_base/payment_mode_view.xml (+22/-0) account_banking_payment/__openerp__.py (+1/-0) account_banking_payment/model/__init__.py (+1/-1) account_banking_payment/model/account_payment.py (+1/-0) account_banking_payment/model/payment_mode.py (+7/-4) account_banking_payment/view/payment_mode.xml (+1/-0) account_banking_payment/view/payment_order_create_view.xml (+23/-0) account_banking_sepa_credit_transfer/__openerp__.py (+1/-1) account_banking_sepa_credit_transfer/account_banking_sepa.py (+15/-6) account_banking_sepa_credit_transfer/account_banking_sepa_view.xml (+0/-2) account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot (+12/-70) account_banking_sepa_credit_transfer/i18n/fr.po (+29/-235) account_banking_sepa_credit_transfer/wizard/export_sepa.py (+130/-284) account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml (+0/-1) account_banking_sepa_direct_debit/__init__.py (+25/-0) account_banking_sepa_direct_debit/__openerp__.py (+60/-0) account_banking_sepa_direct_debit/account_banking_sdd.py (+424/-0) account_banking_sepa_direct_debit/account_banking_sdd_view.xml (+80/-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 (+48/-0) account_banking_sepa_direct_debit/sdd_mandate_view.xml (+149/-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 (+451/-0) account_banking_sepa_direct_debit/wizard/export_sdd_view.xml (+37/-0) account_direct_debit/model/account_invoice.py (+3/-3) account_direct_debit/model/account_move_line.py (+31/-0) account_direct_debit/model/account_payment.py (+0/-28) account_direct_debit/view/account_payment.xml (+3/-0) |
To merge this branch: | bzr merge lp:~akretion-team/banking-addons/70-sepa-trf-dd-updates |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guewen Baconnier @ Camptocamp | Approve | ||
Christophe Combelles (community) | Approve | ||
Stefan Rijnhart (Opener) | Approve | ||
Stéphane Bidoul (Acsone) (community) | test sct | Approve | |
Review via email: mp+200019@code.launchpad.net |
Commit message
Description of the change
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_
This merge proposal replaces my former merge proposal which took too much time (the code was already out-dated) :
https:/
P.S. : 38 days left before SEPA migration deadline !
Alexis de Lattre (alexis-via) wrote : | # |
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
Hi,
first of all sorry for my absense on the community front, I have been too busy with first of January deadlines. Hope to show my face more often soon.
So I just had a quick glance and I must thank you Alexis and Luc for your great work. Just one thought about the removal of the communication2 field from the payment line view: does SEPA not allow additional comments on the order lines? And if it really doesn't, maybe we could make the payment view a little bit more dynamic depending on the payment type in a future proposal. Could you leave it in for now?
A cosmetic thing: it seems that remittance_
Stéphane Bidoul (Acsone) (sbi) wrote : | # |
Thanks Alexis and Luc for this great effort.
I made a quick test of account_
In combination with base_iban_
On the nitpicking side, I noticed a few "return True" and the end of generate_*_block methods which are unncessary.
- 226. By Alexis de Lattre
-
Put the field communication2 back in the view of payment lines.
Rename a badly named variable (thanks to Stefan Rijnhart for spotting this)
Alexis de Lattre (alexis-via) wrote : | # |
@Stefan :
I fixed the variable name, thanks for spotting.
About the communication2 field :
- for the unstructured remittance info, there is only a single field of 140 chars. The PAIN standard says "[0..n]" for the unstructured tag, but the EPC guidelines explicitely say "Format Rule: Only one occurrence of ‘Unstructured’ is allowed."
- for the structured remittance info, we use the communication field for the 2.126 reference field (35 chars) ; maybe we could use the communication2 field for the 2.129 "Additionnal Remittance information" field, which is fully optional. But, at the moment, when you have the communication type set to structured, OpenERP prevent you from using the field "communication2" ; it seems that this is managed by addons-
I must say that I don't like to have these 2 fields "communication" and "communication2", because I find it confusing for the users, and I would prefer a single field "communication" to make things simple and avoid mistakes.
By the way, investigating this made me realize that, when communication type = "Free", you can't use the field "communication" because it is readonly ; only the field "communication2" is usable in this case. This is really a mess and the help message on the communication fields don't mention that at all ; I find it very confusing.
@Stéphane Bidoul:
About the "BIC not required". First, looking at the XSD file is not enough, because the target is to respect the guidelines of the European Payment Council (EPC) for SEPA, which may add some constrains that are not in the PAIN standard and thus that are not in the XSD file. When I look at the EPC guidelines, I understand this :
- for the Debtor agent (2.21), this tag is [1..1], but it seems possible to not use the "BIC" and set "Debtor Agent > Financial Institution Identification > Other > Identification" to "NOTPROVIDED".
- for the Creditor agent (2.77), it says explicitely "Usage Rule: Only BIC is allowed", but the Credit Agent tag (2.77) is [0..1], so it may be dropped.
From what I understand, BIC is required for international payments but not required for national payment. When I look at the code of the module "base_iban_
So who handles the check that BIC is present if the IBAN is from a different country than the country of the company ?
Option A : we update the module "base_iban_
Option B : I handle this check in the code of the SEPA modules.
I think option B is better because it will block user earlier in the process (when entering the bank account in OpenERP, not when generating the SEPA XML file). If we agree on option B :
- someone has to update the module "base_iban_
- I will update ...
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
Thanks for your changes! As for optional bics, you wrote you preferred B but I when I read carefully you mean option A.
However, res.partner.bank is not linked to a company, unless it is a bank account of the company itself. Therefore, I do think option B is the only feasible possibility for the constraint, because only then the company and therefore its country is known.
Alexis de Lattre (alexis-via) wrote : | # |
@Stefan
Yes, I meant option A, but I understand you remark about the fact that res.partner.bank is not linked to a company.
So it leaves us with option B... which means I will have to do all the work in my code ! :) But it shouldn't be very hard, as I just have to check that the 2 first letters of the IBAN of the creditor correspond to the country of the debtor (for a SCT).
- 227. By Alexis de Lattre
-
If it's a national payment, we now support "BIC not provided".
Alexis de Lattre (alexis-via) wrote : | # |
@Stéphane Bidoul:
I have implemented option B in revno 227.
I am wondering something : if it's a cross-border credit transfer, we have to provide the BIC of the foreign creditors (my code checks this and raises a nice error msg if it's not the case), but do we have to provide the BIC of the debtor (= Your Company) ?
I am still interested in reading more documentation about the "BIC not required", because I haven't found accurate info about it yet.
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
Basic facts:
The Business Identifier Code (BIC) may still be required until 1 February 2014 for domestic payments and 1 February 2016 for cross-border payments. Member States may defer the requirement relating to the provision of the BIC for national payment transactions until 1 February 2016.
http://
This is expressed differently in different bank's specifications. One bank says: the BIC field is ignored, don't use it. Another bank says: the field is optional. You should use it if the bank cannot determine the BIC by itself.
I know it's not that well specified, but it seems to me that there is even less need for the bank to know the BIC of their own customers. Then again, it seems just good practice if the company BIC were stored properly in OpenERP (I think it is printed by default in the standard report footer). Maybe this is something that can be implemented as a contraint in the not_required module.
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
BTW thanks for already coding the support for missing BICs. In this code, you catch the general exception. Can you catch the actual exception raised instead, or if it's only an exception caused by missing BIC, deal with this differently than a try/catch block?
- 228. By Alexis de Lattre
-
For SCT, if BIC is not provided, we should not put the 'Creditor Agent' block at all, according to EPC guidelines (on this point, it is different from the Direct Debit !)
Alexis de Lattre (alexis-via) wrote : | # |
@Stefan
Thanks for your very clear explaination about BIC and for the URL you provided. It is very clear for me now.
I made some test on the website of a French bank and read this interesting document which precisely deal with this topic (the doc is in French, sorry) :
http://
This document underline a small detail that I didn't catch when reading the guidelines of the EPC : in a credit transfer, for the creditor, you should not put the CreditorAgent block at all (but, in a direct debit, for the debtor, you should use the current implementation Financial Institution Identification > Other > Identification = NOTPROVIDED). I checked again in the guidelines of the EPC and it confirm this. So I have just modified my code to reflect this.
About the exception, you are right, my code is not as good as it should. I am not an expert in this, but i'll try to do better in a later commit.
Stéphane Bidoul (Acsone) (sbi) wrote : | # |
Thanks a lot for the improvement with missing BICs.
I tested it again and checked with the ING validator.
LGTM for SCT.
- 229. By Alexis de Lattre
-
Only catch the openerp exception in generate_
party_agent( ), as suggested by Stefan on the MP.
Alexis de Lattre (alexis-via) wrote : | # |
@Stefan
Could you tell me if my last commit revno 229 addresses your point about the management of the exception ?
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
To be honest, I am still wondering what exception is actually raised in the 'try' block. Is it a direct consequence of the missing BIC? In that case, a simple if-clause would be nicer.
Alexis de Lattre (alexis-via) wrote : | # |
@Stefan
Yes, it is a direct consequence of the support of the missing BIC. I can't put an "if" clause, because the content of the if would be different depending on the origin of the function call :
- if we are in block B, we would have to test "sepa_export.
- if we are in block C, we would have to test "line.bank_
I think that, if we want to avoid this "try/except" in generate_
- check if we have a BIC or not in wizard/
- then I could remove the try/except in the function generate_
So, if you still want me to remove the try/except in generate_
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
Thank you for your response, Alexis. I see it is a little more complicated than a simple if-clause. An alternative solution could be to throw proper ValueError (if it is empty) and TypeError (if it is not a str/unicode) exceptions in _prepare_field, so you could catch these specific exceptions in the try/catch block. But if these were to occur elsewhere, the user would be confronted with a backtrace instead of a popup error from the except_orm.
Given the deadline, maybe this issue should better be put this on the todo list so I'll approve this one now.
Christophe Combelles (ccomb) wrote : | # |
We're successfully using this module in production for a few weeks,
thanks for the work!
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
Excellent work. Thanks
Preview Diff
1 | === added directory 'account_banking_pain_base' |
2 | === added file 'account_banking_pain_base/__init__.py' |
3 | --- account_banking_pain_base/__init__.py 1970-01-01 00:00:00 +0000 |
4 | +++ account_banking_pain_base/__init__.py 2014-01-13 12:42:46 +0000 |
5 | @@ -0,0 +1,26 @@ |
6 | +# -*- encoding: utf-8 -*- |
7 | +############################################################################## |
8 | +# |
9 | +# PAIN Base module for OpenERP |
10 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
11 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
12 | +# |
13 | +# This program is free software: you can redistribute it and/or modify |
14 | +# it under the terms of the GNU Affero General Public License as |
15 | +# published by the Free Software Foundation, either version 3 of the |
16 | +# License, or (at your option) any later version. |
17 | +# |
18 | +# This program is distributed in the hope that it will be useful, |
19 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | +# GNU Affero General Public License for more details. |
22 | +# |
23 | +# You should have received a copy of the GNU Affero General Public License |
24 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
25 | +# |
26 | +############################################################################## |
27 | + |
28 | +from . import payment_line |
29 | +from . import payment_mode |
30 | +from . import company |
31 | +from . import banking_export_pain |
32 | |
33 | === added file 'account_banking_pain_base/__openerp__.py' |
34 | --- account_banking_pain_base/__openerp__.py 1970-01-01 00:00:00 +0000 |
35 | +++ account_banking_pain_base/__openerp__.py 2014-01-13 12:42:46 +0000 |
36 | @@ -0,0 +1,50 @@ |
37 | +############################################################################## |
38 | +# |
39 | +# PAIN base module for OpenERP |
40 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
41 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
42 | +# |
43 | +# This program is free software: you can redistribute it and/or modify |
44 | +# it under the terms of the GNU Affero General Public License as |
45 | +# published by the Free Software Foundation, either version 3 of the |
46 | +# License, or (at your option) any later version. |
47 | +# |
48 | +# This program is distributed in the hope that it will be useful, |
49 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
50 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
51 | +# GNU Affero General Public License for more details. |
52 | +# |
53 | +# You should have received a copy of the GNU Affero General Public License |
54 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
55 | +# |
56 | +############################################################################## |
57 | +{ |
58 | + 'name': 'Account Banking PAIN Base Module', |
59 | + 'summary': 'Base module for PAIN file generation', |
60 | + 'version': '0.1', |
61 | + 'license': 'AGPL-3', |
62 | + 'author': 'Akretion, Noviat', |
63 | + 'website': 'http://openerp-community-association.org/', |
64 | + 'category': 'Hidden', |
65 | + 'depends': ['account_banking_payment_export'], |
66 | + 'external_dependencies': { |
67 | + 'python': ['unidecode', 'lxml'], |
68 | + }, |
69 | + 'data': [ |
70 | + 'payment_line_view.xml', |
71 | + 'payment_mode_view.xml', |
72 | + 'company_view.xml', |
73 | + ], |
74 | + 'description': ''' |
75 | +Base module for PAIN file generation |
76 | +==================================== |
77 | + |
78 | +This module contains fields and functions that are used by the module for SEPA Credit Transfer (account_banking_sepa_credit_transfer) and SEPA Direct Debit (account_banking_sepa_direct_debit). This module doesn't provide any functionnality by itself. |
79 | + |
80 | +This module is part of the banking addons: https://launchpad.net/banking-addons |
81 | + |
82 | +This module was started during the Akretion-Noviat code sprint of November 21st 2013 in Epiais les Louvres (France). |
83 | + ''', |
84 | + 'active': False, |
85 | + 'installable': True, |
86 | +} |
87 | |
88 | === added file 'account_banking_pain_base/banking_export_pain.py' |
89 | --- account_banking_pain_base/banking_export_pain.py 1970-01-01 00:00:00 +0000 |
90 | +++ account_banking_pain_base/banking_export_pain.py 2014-01-13 12:42:46 +0000 |
91 | @@ -0,0 +1,439 @@ |
92 | +# -*- encoding: utf-8 -*- |
93 | +############################################################################## |
94 | +# |
95 | +# PAIN Base module for OpenERP |
96 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
97 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
98 | +# |
99 | +# This program is free software: you can redistribute it and/or modify |
100 | +# it under the terms of the GNU Affero General Public License as |
101 | +# published by the Free Software Foundation, either version 3 of the |
102 | +# License, or (at your option) any later version. |
103 | +# |
104 | +# This program is distributed in the hope that it will be useful, |
105 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
106 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
107 | +# GNU Affero General Public License for more details. |
108 | +# |
109 | +# You should have received a copy of the GNU Affero General Public License |
110 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
111 | +# |
112 | +############################################################################## |
113 | + |
114 | +from openerp.osv import orm |
115 | +from openerp.tools.translate import _ |
116 | +from openerp.tools.safe_eval import safe_eval |
117 | +from datetime import datetime |
118 | +from unidecode import unidecode |
119 | +from lxml import etree |
120 | +from openerp import tools |
121 | +import logging |
122 | +import base64 |
123 | + |
124 | +logger = logging.getLogger(__name__) |
125 | + |
126 | + |
127 | +class banking_export_pain(orm.AbstractModel): |
128 | + _name = 'banking.export.pain' |
129 | + |
130 | + def _validate_iban(self, cr, uid, iban, context=None): |
131 | + '''if IBAN is valid, returns IBAN |
132 | + if IBAN is NOT valid, raises an error message''' |
133 | + partner_bank_obj = self.pool.get('res.partner.bank') |
134 | + if partner_bank_obj.is_iban_valid(cr, uid, iban, context=context): |
135 | + return iban.replace(' ', '') |
136 | + else: |
137 | + raise orm.except_orm( |
138 | + _('Error:'), _("This IBAN is not valid : %s") % iban) |
139 | + |
140 | + def _prepare_field( |
141 | + self, cr, uid, field_name, field_value, eval_ctx, max_size=0, |
142 | + gen_args=None, context=None): |
143 | + '''This function is designed to be inherited !''' |
144 | + if gen_args is None: |
145 | + gen_args = {} |
146 | + assert isinstance(eval_ctx, dict), 'eval_ctx must contain a dict' |
147 | + try: |
148 | + value = safe_eval(field_value, eval_ctx) |
149 | + # SEPA uses XML ; XML = UTF-8 ; UTF-8 = support for all characters |
150 | + # But we are dealing with banks... |
151 | + # and many banks don't want non-ASCCI characters ! |
152 | + # cf section 1.4 "Character set" of the SEPA Credit Transfer |
153 | + # Scheme Customer-to-bank guidelines |
154 | + if gen_args.get('convert_to_ascii'): |
155 | + value = unidecode(value) |
156 | + unallowed_ascii_chars = [ |
157 | + '"', '#', '$', '%', '&', '*', ';', '<', '>', '=', '@', |
158 | + '[', ']', '^', '_', '`', '{', '}', '|', '~', '\\', '!'] |
159 | + for unallowed_ascii_char in unallowed_ascii_chars: |
160 | + value = value.replace(unallowed_ascii_char, '-') |
161 | + except: |
162 | + line = eval_ctx.get('line') |
163 | + if line: |
164 | + raise orm.except_orm( |
165 | + _('Error:'), |
166 | + _("Cannot compute the '%s' of the Payment Line with " |
167 | + "reference '%s'.") |
168 | + % (field_name, line.name)) |
169 | + else: |
170 | + raise orm.except_orm( |
171 | + _('Error:'), |
172 | + _("Cannot compute the '%s'.") % field_name) |
173 | + if not isinstance(value, (str, unicode)): |
174 | + raise orm.except_orm( |
175 | + _('Field type error:'), |
176 | + _("The type of the field '%s' is %s. It should be a string " |
177 | + "or unicode.") |
178 | + % (field_name, type(value))) |
179 | + if not value: |
180 | + raise orm.except_orm( |
181 | + _('Error:'), |
182 | + _("The '%s' is empty or 0. It should have a non-null value.") |
183 | + % field_name) |
184 | + if max_size and len(value) > max_size: |
185 | + value = value[0:max_size] |
186 | + return value |
187 | + |
188 | + def _prepare_export_sepa( |
189 | + self, cr, uid, total_amount, transactions_count, xml_string, |
190 | + gen_args, context=None): |
191 | + return { |
192 | + 'batch_booking': gen_args['sepa_export'].batch_booking, |
193 | + 'charge_bearer': gen_args['sepa_export'].charge_bearer, |
194 | + 'total_amount': total_amount, |
195 | + 'nb_transactions': transactions_count, |
196 | + 'file': base64.encodestring(xml_string), |
197 | + 'payment_order_ids': [( |
198 | + 6, 0, [x.id for x in gen_args['sepa_export'].payment_order_ids] |
199 | + )], |
200 | + } |
201 | + |
202 | + def _validate_xml(self, cr, uid, xml_string, gen_args, context=None): |
203 | + xsd_etree_obj = etree.parse( |
204 | + tools.file_open(gen_args['pain_xsd_file'])) |
205 | + official_pain_schema = etree.XMLSchema(xsd_etree_obj) |
206 | + |
207 | + try: |
208 | + root_to_validate = etree.fromstring(xml_string) |
209 | + official_pain_schema.assertValid(root_to_validate) |
210 | + except Exception, e: |
211 | + logger.warning( |
212 | + "The XML file is invalid against the XML Schema Definition") |
213 | + logger.warning(xml_string) |
214 | + logger.warning(e) |
215 | + raise orm.except_orm( |
216 | + _('Error:'), |
217 | + _("The generated XML file is not valid against the official " |
218 | + "XML Schema Definition. The generated XML file and the " |
219 | + "full error have been written in the server logs. Here " |
220 | + "is the error, which may give you an idea on the cause " |
221 | + "of the problem : %s") |
222 | + % str(e)) |
223 | + return True |
224 | + |
225 | + def finalize_sepa_file_creation( |
226 | + self, cr, uid, ids, xml_root, total_amount, transactions_count, |
227 | + gen_args, context=None): |
228 | + xml_string = etree.tostring( |
229 | + xml_root, pretty_print=True, encoding='UTF-8', |
230 | + xml_declaration=True) |
231 | + logger.debug( |
232 | + "Generated SEPA XML file in format %s below" |
233 | + % gen_args['pain_flavor']) |
234 | + logger.debug(xml_string) |
235 | + self._validate_xml(cr, uid, xml_string, gen_args, context=context) |
236 | + |
237 | + file_id = gen_args['file_obj'].create( |
238 | + cr, uid, self._prepare_export_sepa( |
239 | + cr, uid, total_amount, transactions_count, |
240 | + xml_string, gen_args, context=context), |
241 | + context=context) |
242 | + |
243 | + self.write( |
244 | + cr, uid, ids, { |
245 | + 'file_id': file_id, |
246 | + 'state': 'finish', |
247 | + }, context=context) |
248 | + |
249 | + action = { |
250 | + 'name': 'SEPA File', |
251 | + 'type': 'ir.actions.act_window', |
252 | + 'view_type': 'form', |
253 | + 'view_mode': 'form,tree', |
254 | + 'res_model': self._name, |
255 | + 'res_id': ids[0], |
256 | + 'target': 'new', |
257 | + } |
258 | + return action |
259 | + |
260 | + def generate_group_header_block( |
261 | + self, cr, uid, parent_node, gen_args, context=None): |
262 | + group_header_1_0 = etree.SubElement(parent_node, 'GrpHdr') |
263 | + message_identification_1_1 = etree.SubElement( |
264 | + group_header_1_0, 'MsgId') |
265 | + message_identification_1_1.text = self._prepare_field( |
266 | + cr, uid, 'Message Identification', |
267 | + 'sepa_export.payment_order_ids[0].reference', |
268 | + {'sepa_export': gen_args['sepa_export']}, 35, |
269 | + gen_args=gen_args, context=context) |
270 | + creation_date_time_1_2 = etree.SubElement(group_header_1_0, 'CreDtTm') |
271 | + creation_date_time_1_2.text = datetime.strftime( |
272 | + datetime.today(), '%Y-%m-%dT%H:%M:%S') |
273 | + if gen_args.get('pain_flavor') == 'pain.001.001.02': |
274 | + # batch_booking is in "Group header" with pain.001.001.02 |
275 | + # and in "Payment info" in pain.001.001.03/04 |
276 | + batch_booking = etree.SubElement(group_header_1_0, 'BtchBookg') |
277 | + batch_booking.text = \ |
278 | + str(gen_args['sepa_export'].batch_booking).lower() |
279 | + nb_of_transactions_1_6 = etree.SubElement( |
280 | + group_header_1_0, 'NbOfTxs') |
281 | + control_sum_1_7 = etree.SubElement(group_header_1_0, 'CtrlSum') |
282 | + # Grpg removed in pain.001.001.03 |
283 | + if gen_args.get('pain_flavor') == 'pain.001.001.02': |
284 | + grouping = etree.SubElement(group_header_1_0, 'Grpg') |
285 | + grouping.text = 'GRPD' |
286 | + self.generate_initiating_party_block( |
287 | + cr, uid, group_header_1_0, gen_args, |
288 | + context=context) |
289 | + return group_header_1_0, nb_of_transactions_1_6, control_sum_1_7 |
290 | + |
291 | + def generate_start_payment_info_block( |
292 | + self, cr, uid, parent_node, payment_info_ident, |
293 | + priority, local_instrument, sequence_type, requested_date, |
294 | + eval_ctx, gen_args, context=None): |
295 | + payment_info_2_0 = etree.SubElement(parent_node, 'PmtInf') |
296 | + payment_info_identification_2_1 = etree.SubElement( |
297 | + payment_info_2_0, 'PmtInfId') |
298 | + payment_info_identification_2_1.text = self._prepare_field( |
299 | + cr, uid, 'Payment Information Identification', |
300 | + payment_info_ident, eval_ctx, 35, |
301 | + gen_args=gen_args, context=context) |
302 | + payment_method_2_2 = etree.SubElement(payment_info_2_0, 'PmtMtd') |
303 | + payment_method_2_2.text = gen_args['payment_method'] |
304 | + if gen_args.get('pain_flavor') != 'pain.001.001.02': |
305 | + batch_booking_2_3 = etree.SubElement(payment_info_2_0, 'BtchBookg') |
306 | + batch_booking_2_3.text = \ |
307 | + str(gen_args['sepa_export'].batch_booking).lower() |
308 | + # The "SEPA Customer-to-bank |
309 | + # Implementation guidelines" for SCT and SDD says that control sum |
310 | + # and nb_of_transactions should be present |
311 | + # at both "group header" level and "payment info" level |
312 | + nb_of_transactions_2_4 = etree.SubElement( |
313 | + payment_info_2_0, 'NbOfTxs') |
314 | + control_sum_2_5 = etree.SubElement(payment_info_2_0, 'CtrlSum') |
315 | + payment_type_info_2_6 = etree.SubElement( |
316 | + payment_info_2_0, 'PmtTpInf') |
317 | + if priority: |
318 | + instruction_priority_2_7 = etree.SubElement( |
319 | + payment_type_info_2_6, 'InstrPrty') |
320 | + instruction_priority_2_7.text = priority |
321 | + service_level_2_8 = etree.SubElement( |
322 | + payment_type_info_2_6, 'SvcLvl') |
323 | + service_level_code_2_9 = etree.SubElement(service_level_2_8, 'Cd') |
324 | + service_level_code_2_9.text = 'SEPA' |
325 | + if local_instrument: |
326 | + local_instrument_2_11 = etree.SubElement( |
327 | + payment_type_info_2_6, 'LclInstrm') |
328 | + local_instr_code_2_12 = etree.SubElement( |
329 | + local_instrument_2_11, 'Cd') |
330 | + local_instr_code_2_12.text = local_instrument |
331 | + if sequence_type: |
332 | + sequence_type_2_14 = etree.SubElement( |
333 | + payment_type_info_2_6, 'SeqTp') |
334 | + sequence_type_2_14.text = sequence_type |
335 | + |
336 | + if gen_args['payment_method'] == 'DD': |
337 | + request_date_tag = 'ReqdColltnDt' |
338 | + else: |
339 | + request_date_tag = 'ReqdExctnDt' |
340 | + requested_date_2_17 = etree.SubElement( |
341 | + payment_info_2_0, request_date_tag) |
342 | + requested_date_2_17.text = requested_date |
343 | + return payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5 |
344 | + |
345 | + def generate_initiating_party_block( |
346 | + self, cr, uid, parent_node, gen_args, context=None): |
347 | + my_company_name = self._prepare_field( |
348 | + cr, uid, 'Company Name', |
349 | + 'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name', |
350 | + {'sepa_export': gen_args['sepa_export']}, |
351 | + gen_args.get('name_maxsize'), gen_args=gen_args, context=context) |
352 | + initiating_party_1_8 = etree.SubElement(parent_node, 'InitgPty') |
353 | + initiating_party_name = etree.SubElement(initiating_party_1_8, 'Nm') |
354 | + initiating_party_name.text = my_company_name |
355 | + initiating_party_identifier = self.pool['res.company'].\ |
356 | + _get_initiating_party_identifier( |
357 | + cr, uid, |
358 | + gen_args['sepa_export'].payment_order_ids[0].company_id.id, |
359 | + context=context) |
360 | + initiating_party_issuer = gen_args['sepa_export'].\ |
361 | + payment_order_ids[0].company_id.initiating_party_issuer |
362 | + if initiating_party_identifier and initiating_party_issuer: |
363 | + iniparty_id = etree.SubElement(initiating_party_1_8, 'Id') |
364 | + iniparty_org_id = etree.SubElement(iniparty_id, 'OrgId') |
365 | + iniparty_org_other = etree.SubElement(iniparty_org_id, 'Othr') |
366 | + iniparty_org_other_id = etree.SubElement(iniparty_org_other, 'Id') |
367 | + iniparty_org_other_id.text = initiating_party_identifier |
368 | + iniparty_org_other_issuer = etree.SubElement( |
369 | + iniparty_org_other, 'Issr') |
370 | + iniparty_org_other_issuer.text = initiating_party_issuer |
371 | + return True |
372 | + |
373 | + def generate_party_agent( |
374 | + self, cr, uid, parent_node, party_type, party_type_label, |
375 | + order, party_name, iban, bic, eval_ctx, gen_args, context=None): |
376 | + '''Generate the piece of the XML file corresponding to BIC |
377 | + This code is mutualized between TRF and DD''' |
378 | + assert order in ('B', 'C'), "Order can be 'B' or 'C'" |
379 | + try: |
380 | + bic = self._prepare_field( |
381 | + cr, uid, '%s BIC' % party_type_label, bic, eval_ctx, |
382 | + gen_args=gen_args, context=context) |
383 | + party_agent = etree.SubElement(parent_node, '%sAgt' % party_type) |
384 | + party_agent_institution = etree.SubElement( |
385 | + party_agent, 'FinInstnId') |
386 | + party_agent_bic = etree.SubElement( |
387 | + party_agent_institution, gen_args.get('bic_xml_tag')) |
388 | + party_agent_bic.text = bic |
389 | + except except_orm: |
390 | + if order == 'C': |
391 | + if iban[0:2] != gen_args['initiating_party_country_code']: |
392 | + raise orm.except_orm( |
393 | + _('Error:'), |
394 | + _("The bank account with IBAN '%s' of partner '%s' " |
395 | + "must have an associated BIC because it is a " |
396 | + "cross-border SEPA operation.") |
397 | + % (iban, party_name)) |
398 | + if order == 'B' or ( |
399 | + order == 'C' and gen_args['payment_method'] == 'DD'): |
400 | + party_agent = etree.SubElement( |
401 | + parent_node, '%sAgt' % party_type) |
402 | + party_agent_institution = etree.SubElement( |
403 | + party_agent, 'FinInstnId') |
404 | + party_agent_other = etree.SubElement( |
405 | + party_agent_institution, 'Othr') |
406 | + party_agent_other_identification = etree.SubElement( |
407 | + party_agent_other, 'Id') |
408 | + party_agent_other_identification.text = 'NOTPROVIDED' |
409 | + # for Credit Transfers, in the 'C' block, if BIC is not provided, |
410 | + # we should not put the 'Creditor Agent' block at all, |
411 | + # as per the guidelines of the EPC |
412 | + return True |
413 | + |
414 | + def generate_party_block( |
415 | + self, cr, uid, parent_node, party_type, order, name, iban, bic, |
416 | + eval_ctx, gen_args, context=None): |
417 | + '''Generate the piece of the XML file corresponding to Name+IBAN+BIC |
418 | + This code is mutualized between TRF and DD''' |
419 | + assert order in ('B', 'C'), "Order can be 'B' or 'C'" |
420 | + if party_type == 'Cdtr': |
421 | + party_type_label = 'Creditor' |
422 | + elif party_type == 'Dbtr': |
423 | + party_type_label = 'Debtor' |
424 | + party_name = self._prepare_field( |
425 | + cr, uid, '%s Name' % party_type_label, name, eval_ctx, |
426 | + gen_args.get('name_maxsize'), |
427 | + gen_args=gen_args, context=context) |
428 | + piban = self._prepare_field( |
429 | + cr, uid, '%s IBAN' % party_type_label, iban, eval_ctx, |
430 | + gen_args=gen_args, |
431 | + context=context) |
432 | + viban = self._validate_iban(cr, uid, piban, context=context) |
433 | + # At C level, the order is : BIC, Name, IBAN |
434 | + # At B level, the order is : Name, IBAN, BIC |
435 | + if order == 'B': |
436 | + gen_args['initiating_party_country_code'] = viban[0:2] |
437 | + elif order == 'C': |
438 | + self.generate_party_agent( |
439 | + cr, uid, parent_node, party_type, party_type_label, |
440 | + order, party_name, viban, bic, |
441 | + eval_ctx, gen_args, context=context) |
442 | + party = etree.SubElement(parent_node, party_type) |
443 | + party_nm = etree.SubElement(party, 'Nm') |
444 | + party_nm.text = party_name |
445 | + party_account = etree.SubElement( |
446 | + parent_node, '%sAcct' % party_type) |
447 | + party_account_id = etree.SubElement(party_account, 'Id') |
448 | + party_account_iban = etree.SubElement( |
449 | + party_account_id, 'IBAN') |
450 | + party_account_iban.text = viban |
451 | + if order == 'B': |
452 | + self.generate_party_agent( |
453 | + cr, uid, parent_node, party_type, party_type_label, |
454 | + order, party_name, viban, bic, |
455 | + eval_ctx, gen_args, context=context) |
456 | + return True |
457 | + |
458 | + def generate_remittance_info_block( |
459 | + self, cr, uid, parent_node, line, gen_args, context=None): |
460 | + |
461 | + remittance_info_2_91 = etree.SubElement( |
462 | + parent_node, 'RmtInf') |
463 | + if line.state == 'normal': |
464 | + remittance_info_unstructured_2_99 = etree.SubElement( |
465 | + remittance_info_2_91, 'Ustrd') |
466 | + remittance_info_unstructured_2_99.text = \ |
467 | + self._prepare_field( |
468 | + cr, uid, 'Remittance Unstructured Information', |
469 | + 'line.communication', {'line': line}, 140, |
470 | + gen_args=gen_args, |
471 | + context=context) |
472 | + else: |
473 | + if not line.struct_communication_type: |
474 | + raise orm.except_orm( |
475 | + _('Error:'), |
476 | + _("Missing 'Structured Communication Type' on payment " |
477 | + "line with reference '%s'.") |
478 | + % (line.name)) |
479 | + remittance_info_structured_2_100 = etree.SubElement( |
480 | + remittance_info_2_91, 'Strd') |
481 | + creditor_ref_information_2_120 = etree.SubElement( |
482 | + remittance_info_structured_2_100, 'CdtrRefInf') |
483 | + if gen_args.get('pain_flavor') == 'pain.001.001.02': |
484 | + creditor_ref_info_type_2_121 = etree.SubElement( |
485 | + creditor_ref_information_2_120, 'CdtrRefTp') |
486 | + creditor_ref_info_type_code_2_123 = etree.SubElement( |
487 | + creditor_ref_info_type_2_121, 'Cd') |
488 | + creditor_ref_info_type_issuer_2_125 = etree.SubElement( |
489 | + creditor_ref_info_type_2_121, 'Issr') |
490 | + creditor_reference_2_126 = etree.SubElement( |
491 | + creditor_ref_information_2_120, 'CdtrRef') |
492 | + else: |
493 | + creditor_ref_info_type_2_121 = etree.SubElement( |
494 | + creditor_ref_information_2_120, 'Tp') |
495 | + creditor_ref_info_type_or_2_122 = etree.SubElement( |
496 | + creditor_ref_info_type_2_121, 'CdOrPrtry') |
497 | + creditor_ref_info_type_code_2_123 = etree.SubElement( |
498 | + creditor_ref_info_type_or_2_122, 'Cd') |
499 | + creditor_ref_info_type_issuer_2_125 = etree.SubElement( |
500 | + creditor_ref_info_type_2_121, 'Issr') |
501 | + creditor_reference_2_126 = etree.SubElement( |
502 | + creditor_ref_information_2_120, 'Ref') |
503 | + |
504 | + creditor_ref_info_type_code_2_123.text = 'SCOR' |
505 | + creditor_ref_info_type_issuer_2_125.text = \ |
506 | + line.struct_communication_type |
507 | + creditor_reference_2_126.text = \ |
508 | + self._prepare_field( |
509 | + cr, uid, 'Creditor Structured Reference', |
510 | + 'line.communication', {'line': line}, 35, |
511 | + gen_args=gen_args, |
512 | + context=context) |
513 | + return True |
514 | + |
515 | + def generate_creditor_scheme_identification( |
516 | + self, cr, uid, parent_node, identification, identification_label, |
517 | + eval_ctx, scheme_name_proprietary, gen_args, context=None): |
518 | + csi_id = etree.SubElement( |
519 | + parent_node, 'Id') |
520 | + csi_privateid = csi_id = etree.SubElement(csi_id, 'PrvtId') |
521 | + csi_other = etree.SubElement(csi_privateid, 'Othr') |
522 | + csi_other_id = etree.SubElement(csi_other, 'Id') |
523 | + csi_other_id.text = self._prepare_field( |
524 | + cr, uid, identification_label, identification, eval_ctx, |
525 | + gen_args=gen_args, context=context) |
526 | + csi_scheme_name = etree.SubElement(csi_other, 'SchmeNm') |
527 | + csi_scheme_name_proprietary = etree.SubElement( |
528 | + csi_scheme_name, 'Prtry') |
529 | + csi_scheme_name_proprietary.text = scheme_name_proprietary |
530 | + return True |
531 | |
532 | === added file 'account_banking_pain_base/company.py' |
533 | --- account_banking_pain_base/company.py 1970-01-01 00:00:00 +0000 |
534 | +++ account_banking_pain_base/company.py 2014-01-13 12:42:46 +0000 |
535 | @@ -0,0 +1,78 @@ |
536 | +# -*- encoding: utf-8 -*- |
537 | +############################################################################## |
538 | +# |
539 | +# PAIN Base module for OpenERP |
540 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
541 | +# Copyright (C) 2013 Noviat (http://www.noviat.com) |
542 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
543 | +# @author: Luc de Meyer (Noviat) |
544 | +# |
545 | +# This program is free software: you can redistribute it and/or modify |
546 | +# it under the terms of the GNU Affero General Public License as |
547 | +# published by the Free Software Foundation, either version 3 of the |
548 | +# License, or (at your option) any later version. |
549 | +# |
550 | +# This program is distributed in the hope that it will be useful, |
551 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
552 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
553 | +# GNU Affero General Public License for more details. |
554 | +# |
555 | +# You should have received a copy of the GNU Affero General Public License |
556 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
557 | +# |
558 | +############################################################################## |
559 | + |
560 | +from openerp.osv import orm, fields |
561 | + |
562 | + |
563 | +class res_company(orm.Model): |
564 | + _inherit = 'res.company' |
565 | + |
566 | + _columns = { |
567 | + 'initiating_party_issuer': fields.char( |
568 | + 'Initiating Party Issuer', size=35, |
569 | + help="This will be used as the 'Initiating Party Issuer' in the " |
570 | + "PAIN files generated by OpenERP."), |
571 | + } |
572 | + |
573 | + def _get_initiating_party_identifier( |
574 | + self, cr, uid, company_id, context=None): |
575 | + '''The code here may be different from one country to another. |
576 | + If you need to add support for an additionnal country, you can |
577 | + contribute your code here or inherit this function in the |
578 | + localization modules for your country''' |
579 | + assert isinstance(company_id, int), 'Only one company ID' |
580 | + company = self.browse(cr, uid, company_id, context=context) |
581 | + company_vat = company.vat |
582 | + party_identifier = False |
583 | + if company_vat and company_vat[0:2].upper() in ['BE']: |
584 | + party_identifier = company_vat[2:].replace(' ', '') |
585 | + return party_identifier |
586 | + |
587 | + def _initiating_party_issuer_default(self, cr, uid, context=None): |
588 | + '''If you need to add support for an additionnal country, you can |
589 | + add an entry in the dict "party_issuer_per_country" here |
590 | + or inherit this function in the localization modules for |
591 | + your country''' |
592 | + initiating_party_issuer = '' |
593 | + # If your country require the 'Initiating Party Issuer', you should |
594 | + # contribute the entry for your country in the dict below |
595 | + party_issuer_per_country = { |
596 | + 'BE': 'KBO-BCE', # KBO-BCE = the registry of companies in Belgium |
597 | + } |
598 | + company_id = self._company_default_get( |
599 | + cr, uid, 'res.company', context=context) |
600 | + if company_id: |
601 | + company = self.browse(cr, uid, company_id, context=context) |
602 | + country_code = company.country_id.code |
603 | + initiating_party_issuer = party_issuer_per_country.get( |
604 | + country_code, '') |
605 | + return initiating_party_issuer |
606 | + |
607 | + def _initiating_party_issuer_def(self, cr, uid, context=None): |
608 | + return self._initiating_party_issuer_default( |
609 | + cr, uid, context=context) |
610 | + |
611 | + _defaults = { |
612 | + 'initiating_party_issuer': _initiating_party_issuer_def, |
613 | + } |
614 | |
615 | === added file 'account_banking_pain_base/company_view.xml' |
616 | --- account_banking_pain_base/company_view.xml 1970-01-01 00:00:00 +0000 |
617 | +++ account_banking_pain_base/company_view.xml 2014-01-13 12:42:46 +0000 |
618 | @@ -0,0 +1,24 @@ |
619 | +<?xml version="1.0" encoding="utf-8"?> |
620 | +<!-- |
621 | + Copyright (C) 2013 Akretion (http://www.akretion.com) |
622 | + @author: Alexis de Lattre <alexis.delattre@akretion.com> |
623 | + The licence is in the file __openerp__.py |
624 | +--> |
625 | +<openerp> |
626 | +<data> |
627 | + |
628 | +<record id="view_company_form" model="ir.ui.view"> |
629 | + <field name="name">pain.group.on.res.company.form</field> |
630 | + <field name="model">res.company</field> |
631 | + <field name="inherit_id" ref="base.view_company_form"/> |
632 | + <field name="arch" type="xml"> |
633 | + <group name="account_grp" position="after"> |
634 | + <group name="pain" string="Payment Initiation"> |
635 | + <field name="initiating_party_issuer"/> |
636 | + </group> |
637 | + </group> |
638 | + </field> |
639 | +</record> |
640 | + |
641 | +</data> |
642 | +</openerp> |
643 | |
644 | === added directory 'account_banking_pain_base/i18n' |
645 | === added file 'account_banking_pain_base/i18n/account_banking_pain_base.pot' |
646 | --- account_banking_pain_base/i18n/account_banking_pain_base.pot 1970-01-01 00:00:00 +0000 |
647 | +++ account_banking_pain_base/i18n/account_banking_pain_base.pot 2014-01-13 12:42:46 +0000 |
648 | @@ -0,0 +1,146 @@ |
649 | +# Translation of OpenERP Server. |
650 | +# This file contains the translation of the following modules: |
651 | +# * account_banking_pain_base |
652 | +# |
653 | +msgid "" |
654 | +msgstr "" |
655 | +"Project-Id-Version: OpenERP Server 7.0\n" |
656 | +"Report-Msgid-Bugs-To: \n" |
657 | +"POT-Creation-Date: 2013-12-23 21:26+0000\n" |
658 | +"PO-Revision-Date: 2013-12-23 21:26+0000\n" |
659 | +"Last-Translator: <>\n" |
660 | +"Language-Team: \n" |
661 | +"MIME-Version: 1.0\n" |
662 | +"Content-Type: text/plain; charset=UTF-8\n" |
663 | +"Content-Transfer-Encoding: \n" |
664 | +"Plural-Forms: \n" |
665 | + |
666 | +#. module: account_banking_pain_base |
667 | +#: field:res.company,initiating_party_issuer:0 |
668 | +msgid "Initiating Party Issuer" |
669 | +msgstr "" |
670 | + |
671 | +#. module: account_banking_pain_base |
672 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:122 |
673 | +#, python-format |
674 | +msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s" |
675 | +msgstr "" |
676 | + |
677 | +#. module: account_banking_pain_base |
678 | +#: field:payment.line,priority:0 |
679 | +msgid "Priority" |
680 | +msgstr "" |
681 | + |
682 | +#. module: account_banking_pain_base |
683 | +#: model:ir.model,name:account_banking_pain_base.model_payment_line |
684 | +msgid "Payment Line" |
685 | +msgstr "" |
686 | + |
687 | +#. module: account_banking_pain_base |
688 | +#: model:ir.model,name:account_banking_pain_base.model_payment_mode |
689 | +msgid "Payment Mode" |
690 | +msgstr "" |
691 | + |
692 | +#. module: account_banking_pain_base |
693 | +#: help:res.company,initiating_party_issuer:0 |
694 | +msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP." |
695 | +msgstr "" |
696 | + |
697 | +#. module: account_banking_pain_base |
698 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:351 |
699 | +#, python-format |
700 | +msgid "Missing 'Structured Communication Type' on payment line with reference '%s'." |
701 | +msgstr "" |
702 | + |
703 | +#. module: account_banking_pain_base |
704 | +#: selection:payment.line,priority:0 |
705 | +msgid "Normal" |
706 | +msgstr "" |
707 | + |
708 | +#. module: account_banking_pain_base |
709 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:70 |
710 | +#, python-format |
711 | +msgid "Cannot compute the '%s' of the Payment Line with reference '%s'." |
712 | +msgstr "" |
713 | + |
714 | +#. module: account_banking_pain_base |
715 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:77 |
716 | +#, python-format |
717 | +msgid "Cannot compute the '%s'." |
718 | +msgstr "" |
719 | + |
720 | +#. module: account_banking_pain_base |
721 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:81 |
722 | +#, python-format |
723 | +msgid "The type of the field '%s' is %s. It should be a string or unicode." |
724 | +msgstr "" |
725 | + |
726 | +#. module: account_banking_pain_base |
727 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:47 |
728 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:69 |
729 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:76 |
730 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:86 |
731 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:121 |
732 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:350 |
733 | +#, python-format |
734 | +msgid "Error:" |
735 | +msgstr "" |
736 | + |
737 | +#. module: account_banking_pain_base |
738 | +#: model:ir.model,name:account_banking_pain_base.model_res_company |
739 | +msgid "Companies" |
740 | +msgstr "" |
741 | + |
742 | +#. module: account_banking_pain_base |
743 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:47 |
744 | +#, python-format |
745 | +msgid "This IBAN is not valid : %s" |
746 | +msgstr "" |
747 | + |
748 | +#. module: account_banking_pain_base |
749 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:80 |
750 | +#, python-format |
751 | +msgid "Field type error:" |
752 | +msgstr "" |
753 | + |
754 | +#. module: account_banking_pain_base |
755 | +#: field:payment.line,struct_communication_type:0 |
756 | +msgid "Structured Communication Type" |
757 | +msgstr "" |
758 | + |
759 | +#. module: account_banking_pain_base |
760 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:87 |
761 | +#, python-format |
762 | +msgid "The '%s' is empty or 0. It should have a non-null value." |
763 | +msgstr "" |
764 | + |
765 | +#. module: account_banking_pain_base |
766 | +#: model:ir.model,name:account_banking_pain_base.model_banking_export_pain |
767 | +msgid "banking.export.pain" |
768 | +msgstr "" |
769 | + |
770 | +#. module: account_banking_pain_base |
771 | +#: help:payment.mode,convert_to_ascii:0 |
772 | +msgid "If active, OpenERP will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file." |
773 | +msgstr "" |
774 | + |
775 | +#. module: account_banking_pain_base |
776 | +#: help:payment.line,priority:0 |
777 | +msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file." |
778 | +msgstr "" |
779 | + |
780 | +#. module: account_banking_pain_base |
781 | +#: view:res.company:0 |
782 | +msgid "Payment Initiation" |
783 | +msgstr "" |
784 | + |
785 | +#. module: account_banking_pain_base |
786 | +#: selection:payment.line,priority:0 |
787 | +msgid "High" |
788 | +msgstr "" |
789 | + |
790 | +#. module: account_banking_pain_base |
791 | +#: field:payment.mode,convert_to_ascii:0 |
792 | +msgid "Convert to ASCII" |
793 | +msgstr "" |
794 | + |
795 | |
796 | === added file 'account_banking_pain_base/i18n/fr.po' |
797 | --- account_banking_pain_base/i18n/fr.po 1970-01-01 00:00:00 +0000 |
798 | +++ account_banking_pain_base/i18n/fr.po 2014-01-13 12:42:46 +0000 |
799 | @@ -0,0 +1,146 @@ |
800 | +# Translation of OpenERP Server. |
801 | +# This file contains the translation of the following modules: |
802 | +# * account_banking_pain_base |
803 | +# |
804 | +msgid "" |
805 | +msgstr "" |
806 | +"Project-Id-Version: OpenERP Server 7.0\n" |
807 | +"Report-Msgid-Bugs-To: \n" |
808 | +"POT-Creation-Date: 2013-12-23 21:27+0000\n" |
809 | +"PO-Revision-Date: 2013-12-23 21:27+0000\n" |
810 | +"Last-Translator: <>\n" |
811 | +"Language-Team: \n" |
812 | +"MIME-Version: 1.0\n" |
813 | +"Content-Type: text/plain; charset=UTF-8\n" |
814 | +"Content-Transfer-Encoding: \n" |
815 | +"Plural-Forms: \n" |
816 | + |
817 | +#. module: account_banking_pain_base |
818 | +#: field:res.company,initiating_party_issuer:0 |
819 | +msgid "Initiating Party Issuer" |
820 | +msgstr "Initiating Party Issuer" |
821 | + |
822 | +#. module: account_banking_pain_base |
823 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:122 |
824 | +#, python-format |
825 | +msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s" |
826 | +msgstr "Le fichier XML généré n'est pas valide par rapport à la Définition du Schéma XML officiel. Le fichier XML généré et le message d'erreur complet ont été écrits dans les logs du serveur. Voici l'erreur, qui vous donnera peut-être une idée sur la cause du problème : %s" |
827 | + |
828 | +#. module: account_banking_pain_base |
829 | +#: field:payment.line,priority:0 |
830 | +msgid "Priority" |
831 | +msgstr "Priorité" |
832 | + |
833 | +#. module: account_banking_pain_base |
834 | +#: model:ir.model,name:account_banking_pain_base.model_payment_line |
835 | +msgid "Payment Line" |
836 | +msgstr "Ligne de paiement" |
837 | + |
838 | +#. module: account_banking_pain_base |
839 | +#: model:ir.model,name:account_banking_pain_base.model_payment_mode |
840 | +msgid "Payment Mode" |
841 | +msgstr "Mode de paiement" |
842 | + |
843 | +#. module: account_banking_pain_base |
844 | +#: help:res.company,initiating_party_issuer:0 |
845 | +msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP." |
846 | +msgstr "Ce champ sera le 'Initiating Party Issuer' dans les fichiers PAIN générés par OpenERP." |
847 | + |
848 | +#. module: account_banking_pain_base |
849 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:351 |
850 | +#, python-format |
851 | +msgid "Missing 'Structured Communication Type' on payment line with reference '%s'." |
852 | +msgstr "Le 'Type de communication structuré' n'est pas renseigné sur la ligne de paiement ayant la référence '%s'." |
853 | + |
854 | +#. module: account_banking_pain_base |
855 | +#: selection:payment.line,priority:0 |
856 | +msgid "Normal" |
857 | +msgstr "Normal" |
858 | + |
859 | +#. module: account_banking_pain_base |
860 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:70 |
861 | +#, python-format |
862 | +msgid "Cannot compute the '%s' of the Payment Line with reference '%s'." |
863 | +msgstr "Impossible de calculer le '%s' de la ligne de paiement ayant la référence '%s'." |
864 | + |
865 | +#. module: account_banking_pain_base |
866 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:77 |
867 | +#, python-format |
868 | +msgid "Cannot compute the '%s'." |
869 | +msgstr "Impossible de calculer le '%s'." |
870 | + |
871 | +#. module: account_banking_pain_base |
872 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:81 |
873 | +#, python-format |
874 | +msgid "The type of the field '%s' is %s. It should be a string or unicode." |
875 | +msgstr "Le type du champ '%s' est %s. Il devrait être de type string ou unicode." |
876 | + |
877 | +#. module: account_banking_pain_base |
878 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:47 |
879 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:69 |
880 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:76 |
881 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:86 |
882 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:121 |
883 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:350 |
884 | +#, python-format |
885 | +msgid "Error:" |
886 | +msgstr "Erreur :" |
887 | + |
888 | +#. module: account_banking_pain_base |
889 | +#: model:ir.model,name:account_banking_pain_base.model_res_company |
890 | +msgid "Companies" |
891 | +msgstr "Sociétés" |
892 | + |
893 | +#. module: account_banking_pain_base |
894 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:47 |
895 | +#, python-format |
896 | +msgid "This IBAN is not valid : %s" |
897 | +msgstr "Cet IBAN n'est pas valide : %s" |
898 | + |
899 | +#. module: account_banking_pain_base |
900 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:80 |
901 | +#, python-format |
902 | +msgid "Field type error:" |
903 | +msgstr "Erreur dans le type de champ :" |
904 | + |
905 | +#. module: account_banking_pain_base |
906 | +#: field:payment.line,struct_communication_type:0 |
907 | +msgid "Structured Communication Type" |
908 | +msgstr "Type de communication structurée" |
909 | + |
910 | +#. module: account_banking_pain_base |
911 | +#: code:addons/account_banking_pain_base/banking_export_pain.py:87 |
912 | +#, python-format |
913 | +msgid "The '%s' is empty or 0. It should have a non-null value." |
914 | +msgstr "Le '%s' est vide ou égal à 0. Il devrait avoir une valeur non-nulle." |
915 | + |
916 | +#. module: account_banking_pain_base |
917 | +#: model:ir.model,name:account_banking_pain_base.model_banking_export_pain |
918 | +msgid "banking.export.pain" |
919 | +msgstr "banking.export.pain" |
920 | + |
921 | +#. module: account_banking_pain_base |
922 | +#: help:payment.mode,convert_to_ascii:0 |
923 | +msgid "If active, OpenERP will convert each accented caracter to the corresponding unaccented caracter, so that only ASCII caracters are used in the generated PAIN file." |
924 | +msgstr "Si actif, OpenERP convertira chaque caractère accentué en son équivalent non accentué, de telle façon que seuls des caractères ASCII soient utilisés dans le fichier PAIN généré." |
925 | + |
926 | +#. module: account_banking_pain_base |
927 | +#: help:payment.line,priority:0 |
928 | +msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file." |
929 | +msgstr "Ce champ sera le 'Instruction Priority' dans le fichier PAIN généré." |
930 | + |
931 | +#. module: account_banking_pain_base |
932 | +#: view:res.company:0 |
933 | +msgid "Payment Initiation" |
934 | +msgstr "Payment Initiation" |
935 | + |
936 | +#. module: account_banking_pain_base |
937 | +#: selection:payment.line,priority:0 |
938 | +msgid "High" |
939 | +msgstr "Élevé" |
940 | + |
941 | +#. module: account_banking_pain_base |
942 | +#: field:payment.mode,convert_to_ascii:0 |
943 | +msgid "Convert to ASCII" |
944 | +msgstr "Convertir en ASCII" |
945 | + |
946 | |
947 | === added file 'account_banking_pain_base/payment_line.py' |
948 | --- account_banking_pain_base/payment_line.py 1970-01-01 00:00:00 +0000 |
949 | +++ account_banking_pain_base/payment_line.py 2014-01-13 12:42:46 +0000 |
950 | @@ -0,0 +1,52 @@ |
951 | +# -*- encoding: utf-8 -*- |
952 | +############################################################################## |
953 | +# |
954 | +# PAIN Base module for OpenERP |
955 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
956 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
957 | +# |
958 | +# This program is free software: you can redistribute it and/or modify |
959 | +# it under the terms of the GNU Affero General Public License as |
960 | +# published by the Free Software Foundation, either version 3 of the |
961 | +# License, or (at your option) any later version. |
962 | +# |
963 | +# This program is distributed in the hope that it will be useful, |
964 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
965 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
966 | +# GNU Affero General Public License for more details. |
967 | +# |
968 | +# You should have received a copy of the GNU Affero General Public License |
969 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
970 | +# |
971 | +############################################################################## |
972 | + |
973 | +from openerp.osv import orm, fields |
974 | + |
975 | + |
976 | +class payment_line(orm.Model): |
977 | + _inherit = 'payment.line' |
978 | + |
979 | + def _get_struct_communication_types(self, cr, uid, context=None): |
980 | + return [('ISO', 'ISO')] |
981 | + |
982 | + _columns = { |
983 | + 'priority': fields.selection([ |
984 | + ('NORM', 'Normal'), |
985 | + ('HIGH', 'High'), |
986 | + ], 'Priority', |
987 | + help="This field will be used as the 'Instruction Priority' in " |
988 | + "the generated PAIN file."), |
989 | + # Update size from 64 to 140, because PAIN allows 140 caracters |
990 | + 'communication': fields.char( |
991 | + 'Communication', size=140, required=True, |
992 | + help="Used as the message between ordering customer and current " |
993 | + "company. Depicts 'What do you want to say to the recipient " |
994 | + "about this order ?'"), |
995 | + 'struct_communication_type': fields.selection( |
996 | + _get_struct_communication_types, 'Structured Communication Type'), |
997 | + } |
998 | + |
999 | + _defaults = { |
1000 | + 'priority': 'NORM', |
1001 | + 'struct_communication_type': 'ISO', |
1002 | + } |
1003 | |
1004 | === added file 'account_banking_pain_base/payment_line_view.xml' |
1005 | --- account_banking_pain_base/payment_line_view.xml 1970-01-01 00:00:00 +0000 |
1006 | +++ account_banking_pain_base/payment_line_view.xml 2014-01-13 12:42:46 +0000 |
1007 | @@ -0,0 +1,41 @@ |
1008 | +<?xml version="1.0" encoding="utf-8"?> |
1009 | +<!-- |
1010 | + Copyright (C) 2013 Akretion (http://www.akretion.com) |
1011 | + @author: Alexis de Lattre <alexis.delattre@akretion.com> |
1012 | + The licence is in the file __openerp__.py |
1013 | +--> |
1014 | +<openerp> |
1015 | +<data> |
1016 | + |
1017 | +<record id="view_payment_line_form" model="ir.ui.view"> |
1018 | + <field name="name">pain.base.payment.line.form</field> |
1019 | + <field name="model">payment.line</field> |
1020 | + <field name="inherit_id" ref="account_payment.view_payment_line_form"/> |
1021 | + <field name="arch" type="xml"> |
1022 | + <field name="bank_id" position="after"> |
1023 | + <field name="priority"/> |
1024 | + <newline /> |
1025 | + </field> |
1026 | + <field name="state" position="after"> |
1027 | + <field name="struct_communication_type" attrs="{'invisible': [('state', '!=', 'structured')], 'required': [('state', '=', 'structured')]}"/> |
1028 | + </field> |
1029 | + </field> |
1030 | +</record> |
1031 | + |
1032 | +<record id="view_payment_order_form" model="ir.ui.view"> |
1033 | + <field name="name">pain.base.payment.line.inside.order.form</field> |
1034 | + <field name="model">payment.order</field> |
1035 | + <field name="inherit_id" ref="account_payment.view_payment_order_form"/> |
1036 | + <field name="arch" type="xml"> |
1037 | + <xpath expr="//field[@name='line_ids']/form//field[@name='bank_id']" position="after"> |
1038 | + <field name="priority"/> |
1039 | + <newline /> |
1040 | + </xpath> |
1041 | + <xpath expr="//field[@name='line_ids']/form//field[@name='state']" position="after"> |
1042 | + <field name="struct_communication_type" attrs="{'invisible': [('state', '!=', 'structured')], 'required': [('state', '=', 'structured')]}"/> |
1043 | + </xpath> |
1044 | + </field> |
1045 | +</record> |
1046 | + |
1047 | +</data> |
1048 | +</openerp> |
1049 | |
1050 | === added file 'account_banking_pain_base/payment_mode.py' |
1051 | --- account_banking_pain_base/payment_mode.py 1970-01-01 00:00:00 +0000 |
1052 | +++ account_banking_pain_base/payment_mode.py 2014-01-13 12:42:46 +0000 |
1053 | @@ -0,0 +1,39 @@ |
1054 | +# -*- encoding: utf-8 -*- |
1055 | +############################################################################## |
1056 | +# |
1057 | +# PAIN Base module for OpenERP |
1058 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
1059 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
1060 | +# |
1061 | +# This program is free software: you can redistribute it and/or modify |
1062 | +# it under the terms of the GNU Affero General Public License as |
1063 | +# published by the Free Software Foundation, either version 3 of the |
1064 | +# License, or (at your option) any later version. |
1065 | +# |
1066 | +# This program is distributed in the hope that it will be useful, |
1067 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1068 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1069 | +# GNU Affero General Public License for more details. |
1070 | +# |
1071 | +# You should have received a copy of the GNU Affero General Public License |
1072 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1073 | +# |
1074 | +############################################################################## |
1075 | + |
1076 | +from openerp.osv import orm, fields |
1077 | + |
1078 | + |
1079 | +class payment_mode(orm.Model): |
1080 | + _inherit = 'payment.mode' |
1081 | + |
1082 | + _columns = { |
1083 | + 'convert_to_ascii': fields.boolean( |
1084 | + 'Convert to ASCII', |
1085 | + help="If active, OpenERP will convert each accented caracter to " |
1086 | + "the corresponding unaccented caracter, so that only ASCII " |
1087 | + "caracters are used in the generated PAIN file."), |
1088 | + } |
1089 | + |
1090 | + _defaults = { |
1091 | + 'convert_to_ascii': True, |
1092 | + } |
1093 | |
1094 | === added file 'account_banking_pain_base/payment_mode_view.xml' |
1095 | --- account_banking_pain_base/payment_mode_view.xml 1970-01-01 00:00:00 +0000 |
1096 | +++ account_banking_pain_base/payment_mode_view.xml 2014-01-13 12:42:46 +0000 |
1097 | @@ -0,0 +1,22 @@ |
1098 | +<?xml version="1.0" encoding="utf-8"?> |
1099 | +<!-- |
1100 | + Copyright (C) 2013 Akretion (http://www.akretion.com) |
1101 | + @author: Alexis de Lattre <alexis.delattre@akretion.com> |
1102 | + The licence is in the file __openerp__.py |
1103 | +--> |
1104 | +<openerp> |
1105 | +<data> |
1106 | + |
1107 | +<record id="view_payment_mode_form_inherit" model="ir.ui.view"> |
1108 | + <field name="name">add.convert_to_ascii.in.payment.mode.form</field> |
1109 | + <field name="model">payment.mode</field> |
1110 | + <field name="inherit_id" ref="account_banking_payment_export.view_payment_mode_form_inherit"/> |
1111 | + <field name="arch" type="xml"> |
1112 | + <field name="type" position="after"> |
1113 | + <field name="convert_to_ascii"/> |
1114 | + </field> |
1115 | + </field> |
1116 | +</record> |
1117 | + |
1118 | +</data> |
1119 | +</openerp> |
1120 | |
1121 | === modified file 'account_banking_payment/__openerp__.py' |
1122 | --- account_banking_payment/__openerp__.py 2013-08-13 09:18:15 +0000 |
1123 | +++ account_banking_payment/__openerp__.py 2014-01-13 12:42:46 +0000 |
1124 | @@ -39,6 +39,7 @@ |
1125 | 'view/banking_transaction_wizard.xml', |
1126 | 'view/payment_mode.xml', |
1127 | 'view/payment_mode_type.xml', |
1128 | + 'view/payment_order_create_view.xml', |
1129 | 'workflow/account_payment.xml', |
1130 | ], |
1131 | 'description': ''' |
1132 | |
1133 | === modified file 'account_banking_payment/model/__init__.py' |
1134 | --- account_banking_payment/model/__init__.py 2013-08-13 09:18:15 +0000 |
1135 | +++ account_banking_payment/model/__init__.py 2014-01-13 12:42:46 +0000 |
1136 | @@ -1,7 +1,7 @@ |
1137 | import account_payment |
1138 | import payment_line |
1139 | +import payment_mode_type |
1140 | import payment_mode |
1141 | -import payment_mode_type |
1142 | import payment_order_create |
1143 | import banking_import_transaction |
1144 | import banking_transaction_wizard |
1145 | |
1146 | === modified file 'account_banking_payment/model/account_payment.py' |
1147 | --- account_banking_payment/model/account_payment.py 2013-10-14 11:18:42 +0000 |
1148 | +++ account_banking_payment/model/account_payment.py 2014-01-13 12:42:46 +0000 |
1149 | @@ -107,6 +107,7 @@ |
1150 | 'payment_order_type': fields.selection( |
1151 | [('payment', 'Payment'),('debit', 'Direct debit')], |
1152 | 'Payment order type', required=True, |
1153 | + readonly=True, states={'draft': [('readonly', False)]}, |
1154 | ), |
1155 | 'date_sent': fields.date('Send date', readonly=True), |
1156 | } |
1157 | |
1158 | === modified file 'account_banking_payment/model/payment_mode.py' |
1159 | --- account_banking_payment/model/payment_mode.py 2013-08-13 09:18:15 +0000 |
1160 | +++ account_banking_payment/model/payment_mode.py 2014-01-13 12:42:46 +0000 |
1161 | @@ -34,10 +34,9 @@ |
1162 | 'account.account', 'Transfer account', |
1163 | domain=[('type', '=', 'other'), |
1164 | ('reconcile', '=', True)], |
1165 | - help=('Pay off lines in sent orders with a ' |
1166 | - 'move on this account. For debit type modes only. ' |
1167 | - 'You can only select accounts of type regular that ' |
1168 | - 'are marked for reconciliation'), |
1169 | + help=('Pay off lines in sent orders with a move on this ' |
1170 | + 'account. You can only select accounts of type regular ' |
1171 | + 'that are marked for reconciliation'), |
1172 | ), |
1173 | 'transfer_journal_id': fields.many2one( |
1174 | 'account.journal', 'Transfer journal', |
1175 | @@ -50,4 +49,8 @@ |
1176 | help=('Limit selected invoices to invoices with these payment ' |
1177 | 'terms') |
1178 | ), |
1179 | + 'payment_order_type': fields.related( |
1180 | + 'type', 'payment_order_type', readonly=True, type='selection', |
1181 | + selection=[('payment', 'Payment'), ('debit', 'Direct debit')], |
1182 | + string="Payment Order Type"), |
1183 | } |
1184 | |
1185 | === modified file 'account_banking_payment/view/payment_mode.xml' |
1186 | --- account_banking_payment/view/payment_mode.xml 2013-08-13 09:18:15 +0000 |
1187 | +++ account_banking_payment/view/payment_mode.xml 2014-01-13 12:42:46 +0000 |
1188 | @@ -11,6 +11,7 @@ |
1189 | <field name="inherit_id" ref="account_banking_payment_export.view_payment_mode_form_inherit"/> |
1190 | <field name="arch" type="xml"> |
1191 | <field name="type" position="after"> |
1192 | + <field name="payment_order_type"/> |
1193 | <group colspan="4" col="4"> |
1194 | <group colspan="2"> |
1195 | <separator colspan="2" |
1196 | |
1197 | === added file 'account_banking_payment/view/payment_order_create_view.xml' |
1198 | --- account_banking_payment/view/payment_order_create_view.xml 1970-01-01 00:00:00 +0000 |
1199 | +++ account_banking_payment/view/payment_order_create_view.xml 2014-01-13 12:42:46 +0000 |
1200 | @@ -0,0 +1,23 @@ |
1201 | +<?xml version="1.0" encoding="utf-8"?> |
1202 | +<!-- |
1203 | + Copyright (C) 2013 Akretion (http://www.akretion.com) |
1204 | + @author: Alexis de Lattre <alexis.delattre@akretion.com> |
1205 | + The licence is in the file __openerp__.py |
1206 | +--> |
1207 | +<openerp> |
1208 | +<data> |
1209 | + |
1210 | +<record id="view_create_payment_order_lines" model="ir.ui.view"> |
1211 | + <field name="name">add.context.to.display.maturity.date</field> |
1212 | + <field name="model">payment.order.create</field> |
1213 | + <field name="inherit_id" ref="account_payment.view_create_payment_order_lines"/> |
1214 | + <field name="arch" type="xml"> |
1215 | + <field name="entries" position="attributes"> |
1216 | + <attribute name="context">{'journal_type': 'sale'}</attribute> |
1217 | + <attribute name="nolabel">1</attribute> |
1218 | + </field> |
1219 | + </field> |
1220 | +</record> |
1221 | + |
1222 | +</data> |
1223 | +</openerp> |
1224 | |
1225 | === modified file 'account_banking_sepa_credit_transfer/__openerp__.py' |
1226 | --- account_banking_sepa_credit_transfer/__openerp__.py 2013-11-13 08:19:50 +0000 |
1227 | +++ account_banking_sepa_credit_transfer/__openerp__.py 2014-01-13 12:42:46 +0000 |
1228 | @@ -26,7 +26,7 @@ |
1229 | 'author': 'Akretion', |
1230 | 'website': 'http://www.akretion.com', |
1231 | 'category': 'Banking addons', |
1232 | - 'depends': ['account_banking_payment_export'], |
1233 | + 'depends': ['account_banking_pain_base'], |
1234 | 'external_dependencies': { |
1235 | 'python': ['unidecode', 'lxml'], |
1236 | }, |
1237 | |
1238 | === modified file 'account_banking_sepa_credit_transfer/account_banking_sepa.py' |
1239 | --- account_banking_sepa_credit_transfer/account_banking_sepa.py 2013-11-12 21:38:21 +0000 |
1240 | +++ account_banking_sepa_credit_transfer/account_banking_sepa.py 2014-01-13 12:42:46 +0000 |
1241 | @@ -48,22 +48,31 @@ |
1242 | 'banking_export_sepa_id', 'account_order_id', |
1243 | 'Payment Orders', |
1244 | readonly=True), |
1245 | - 'prefered_exec_date': fields.date( |
1246 | - 'Prefered Execution Date', readonly=True), |
1247 | 'nb_transactions': fields.integer( |
1248 | 'Number of Transactions', readonly=True), |
1249 | - 'total_amount': fields.float('Total Amount', |
1250 | - digits_compute=dp.get_precision('Account'), readonly=True), |
1251 | + 'total_amount': fields.float( |
1252 | + 'Total Amount', digits_compute=dp.get_precision('Account'), |
1253 | + readonly=True), |
1254 | 'batch_booking': fields.boolean( |
1255 | 'Batch Booking', readonly=True, |
1256 | - 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."), |
1257 | + help="If true, the bank statement will display only one debit " |
1258 | + "line for all the wire transfers of the SEPA XML file ; " |
1259 | + "if false, the bank statement will display one debit line " |
1260 | + "per wire transfer of the SEPA XML file."), |
1261 | 'charge_bearer': fields.selection([ |
1262 | ('SLEV', 'Following Service Level'), |
1263 | ('SHAR', 'Shared'), |
1264 | ('CRED', 'Borne by Creditor'), |
1265 | ('DEBT', 'Borne by Debtor'), |
1266 | ], 'Charge Bearer', readonly=True, |
1267 | - help='Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor.'), |
1268 | + help="Following service level : transaction charges are to be " |
1269 | + "applied following the rules agreed in the service level and/or " |
1270 | + "scheme (SEPA Core messages must use this). Shared : " |
1271 | + "transaction charges on the creditor side are to be borne by " |
1272 | + "the creditor, transaction charges on the debtor side are to " |
1273 | + "be borne by the debtor. Borne by creditor : all transaction " |
1274 | + "charges are to be borne by the creditor. Borne by debtor : " |
1275 | + "all transaction charges are to be borne by the debtor."), |
1276 | 'create_date': fields.datetime('Generation Date', readonly=True), |
1277 | 'file': fields.binary('SEPA XML File', readonly=True), |
1278 | 'filename': fields.function( |
1279 | |
1280 | === modified file 'account_banking_sepa_credit_transfer/account_banking_sepa_view.xml' |
1281 | --- account_banking_sepa_credit_transfer/account_banking_sepa_view.xml 2013-11-07 11:50:36 +0000 |
1282 | +++ account_banking_sepa_credit_transfer/account_banking_sepa_view.xml 2014-01-13 12:42:46 +0000 |
1283 | @@ -16,7 +16,6 @@ |
1284 | <page string="General Information"> |
1285 | <field name="total_amount" /> |
1286 | <field name="nb_transactions" /> |
1287 | - <field name="prefered_exec_date" /> |
1288 | <field name="batch_booking" /> |
1289 | <field name="charge_bearer"/> |
1290 | <field name="create_date" /> |
1291 | @@ -47,7 +46,6 @@ |
1292 | <field name="arch" type="xml"> |
1293 | <tree string="SEPA Credit Transfer"> |
1294 | <field name="filename"/> |
1295 | - <field name="prefered_exec_date"/> |
1296 | <field name="create_date"/> |
1297 | <field name="nb_transactions"/> |
1298 | </tree> |
1299 | |
1300 | === modified file 'account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot' |
1301 | --- account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot 2013-11-13 09:17:33 +0000 |
1302 | +++ account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot 2014-01-13 12:42:46 +0000 |
1303 | @@ -6,8 +6,8 @@ |
1304 | msgstr "" |
1305 | "Project-Id-Version: OpenERP Server 7.0\n" |
1306 | "Report-Msgid-Bugs-To: \n" |
1307 | -"POT-Creation-Date: 2013-11-13 09:13+0000\n" |
1308 | -"PO-Revision-Date: 2013-11-13 09:13+0000\n" |
1309 | +"POT-Creation-Date: 2013-12-23 22:49+0000\n" |
1310 | +"PO-Revision-Date: 2013-12-23 22:49+0000\n" |
1311 | "Last-Translator: <>\n" |
1312 | "Language-Team: \n" |
1313 | "MIME-Version: 1.0\n" |
1314 | @@ -16,12 +16,6 @@ |
1315 | "Plural-Forms: \n" |
1316 | |
1317 | #. module: account_banking_sepa_credit_transfer |
1318 | -#: field:banking.export.sepa,prefered_exec_date:0 |
1319 | -#: field:banking.export.sepa.wizard,prefered_exec_date:0 |
1320 | -msgid "Prefered Execution Date" |
1321 | -msgstr "" |
1322 | - |
1323 | -#. module: account_banking_sepa_credit_transfer |
1324 | #: selection:banking.export.sepa.wizard,state:0 |
1325 | msgid "Create" |
1326 | msgstr "" |
1327 | @@ -55,12 +49,6 @@ |
1328 | msgstr "" |
1329 | |
1330 | #. module: account_banking_sepa_credit_transfer |
1331 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:117 |
1332 | -#, python-format |
1333 | -msgid "Cannot compute the '%s' of the Payment Line with Invoice Reference '%s'." |
1334 | -msgstr "" |
1335 | - |
1336 | -#. module: account_banking_sepa_credit_transfer |
1337 | #: selection:banking.export.sepa,charge_bearer:0 |
1338 | #: selection:banking.export.sepa.wizard,charge_bearer:0 |
1339 | msgid "Shared" |
1340 | @@ -73,8 +61,13 @@ |
1341 | msgstr "" |
1342 | |
1343 | #. module: account_banking_sepa_credit_transfer |
1344 | +#: selection:banking.export.sepa,state:0 |
1345 | +msgid "Sent" |
1346 | +msgstr "" |
1347 | + |
1348 | +#. module: account_banking_sepa_credit_transfer |
1349 | #: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard |
1350 | -msgid "Export SEPA Credit Transfer XML file" |
1351 | +msgid "Export SEPA Credit Transfer File" |
1352 | msgstr "" |
1353 | |
1354 | #. module: account_banking_sepa_credit_transfer |
1355 | @@ -105,23 +98,6 @@ |
1356 | msgstr "" |
1357 | |
1358 | #. module: account_banking_sepa_credit_transfer |
1359 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:122 |
1360 | -#, python-format |
1361 | -msgid "Cannot compute the '%s'." |
1362 | -msgstr "" |
1363 | - |
1364 | -#. module: account_banking_sepa_credit_transfer |
1365 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:126 |
1366 | -#, python-format |
1367 | -msgid "The type of the field '%s' is %s. It should be a string or unicode." |
1368 | -msgstr "" |
1369 | - |
1370 | -#. module: account_banking_sepa_credit_transfer |
1371 | -#: selection:banking.export.sepa,state:0 |
1372 | -msgid "Sent" |
1373 | -msgstr "" |
1374 | - |
1375 | -#. module: account_banking_sepa_credit_transfer |
1376 | #: view:banking.export.sepa.wizard:0 |
1377 | msgid "Validate" |
1378 | msgstr "" |
1379 | @@ -132,25 +108,14 @@ |
1380 | msgstr "" |
1381 | |
1382 | #. module: account_banking_sepa_credit_transfer |
1383 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:169 |
1384 | -#, python-format |
1385 | -msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s" |
1386 | -msgstr "" |
1387 | - |
1388 | -#. module: account_banking_sepa_credit_transfer |
1389 | #: selection:banking.export.sepa,charge_bearer:0 |
1390 | #: selection:banking.export.sepa.wizard,charge_bearer:0 |
1391 | msgid "Borne by Debtor" |
1392 | msgstr "" |
1393 | |
1394 | #. module: account_banking_sepa_credit_transfer |
1395 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90 |
1396 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:116 |
1397 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:121 |
1398 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:130 |
1399 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:168 |
1400 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:206 |
1401 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:350 |
1402 | +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:128 |
1403 | +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:245 |
1404 | #, python-format |
1405 | msgid "Error:" |
1406 | msgstr "" |
1407 | @@ -173,18 +138,12 @@ |
1408 | msgstr "" |
1409 | |
1410 | #. module: account_banking_sepa_credit_transfer |
1411 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:125 |
1412 | -#, python-format |
1413 | -msgid "Field type error:" |
1414 | -msgstr "" |
1415 | - |
1416 | -#. module: account_banking_sepa_credit_transfer |
1417 | #: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa |
1418 | msgid "SEPA export" |
1419 | msgstr "" |
1420 | |
1421 | #. module: account_banking_sepa_credit_transfer |
1422 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:351 |
1423 | +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:246 |
1424 | #, python-format |
1425 | msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')." |
1426 | msgstr "" |
1427 | @@ -196,29 +155,17 @@ |
1428 | msgstr "" |
1429 | |
1430 | #. module: account_banking_sepa_credit_transfer |
1431 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:131 |
1432 | -#, python-format |
1433 | -msgid "The '%s' is empty or 0. It should have a non-null value." |
1434 | -msgstr "" |
1435 | - |
1436 | -#. module: account_banking_sepa_credit_transfer |
1437 | #: help:banking.export.sepa,charge_bearer:0 |
1438 | msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." |
1439 | msgstr "" |
1440 | |
1441 | #. module: account_banking_sepa_credit_transfer |
1442 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:207 |
1443 | +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:129 |
1444 | #, python-format |
1445 | msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'." |
1446 | msgstr "" |
1447 | |
1448 | #. module: account_banking_sepa_credit_transfer |
1449 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90 |
1450 | -#, python-format |
1451 | -msgid "This IBAN is not valid : %s" |
1452 | -msgstr "" |
1453 | - |
1454 | -#. module: account_banking_sepa_credit_transfer |
1455 | #: view:banking.export.sepa:0 |
1456 | #: field:banking.export.sepa,payment_order_ids:0 |
1457 | #: field:banking.export.sepa.wizard,payment_order_ids:0 |
1458 | @@ -244,11 +191,6 @@ |
1459 | msgstr "" |
1460 | |
1461 | #. module: account_banking_sepa_credit_transfer |
1462 | -#: help:banking.export.sepa.wizard,prefered_exec_date:0 |
1463 | -msgid "This is the date on which the file should be processed by the bank. Please keep in mind that banks only execute on working days and typically use a delay of two days between execution date and effective transfer date." |
1464 | -msgstr "" |
1465 | - |
1466 | -#. module: account_banking_sepa_credit_transfer |
1467 | #: field:banking.export.sepa.wizard,file:0 |
1468 | msgid "File" |
1469 | msgstr "" |
1470 | |
1471 | === modified file 'account_banking_sepa_credit_transfer/i18n/fr.po' |
1472 | --- account_banking_sepa_credit_transfer/i18n/fr.po 2013-12-03 06:20:09 +0000 |
1473 | +++ account_banking_sepa_credit_transfer/i18n/fr.po 2014-01-13 12:42:46 +0000 |
1474 | @@ -6,21 +6,14 @@ |
1475 | msgstr "" |
1476 | "Project-Id-Version: OpenERP Server 7.0\n" |
1477 | "Report-Msgid-Bugs-To: \n" |
1478 | -"POT-Creation-Date: 2013-11-13 09:13+0000\n" |
1479 | -"PO-Revision-Date: 2013-12-02 16:36+0000\n" |
1480 | -"Last-Translator: Alexis de Lattre <alexis@via.ecp.fr>\n" |
1481 | +"POT-Creation-Date: 2013-12-23 22:52+0000\n" |
1482 | +"PO-Revision-Date: 2013-12-23 22:52+0000\n" |
1483 | +"Last-Translator: <>\n" |
1484 | "Language-Team: \n" |
1485 | "MIME-Version: 1.0\n" |
1486 | "Content-Type: text/plain; charset=UTF-8\n" |
1487 | -"Content-Transfer-Encoding: 8bit\n" |
1488 | -"X-Launchpad-Export-Date: 2013-12-03 06:20+0000\n" |
1489 | -"X-Generator: Launchpad (build 16856)\n" |
1490 | - |
1491 | -#. module: account_banking_sepa_credit_transfer |
1492 | -#: field:banking.export.sepa,prefered_exec_date:0 |
1493 | -#: field:banking.export.sepa.wizard,prefered_exec_date:0 |
1494 | -msgid "Prefered Execution Date" |
1495 | -msgstr "Date d'exécution demandée" |
1496 | +"Content-Transfer-Encoding: \n" |
1497 | +"Plural-Forms: \n" |
1498 | |
1499 | #. module: account_banking_sepa_credit_transfer |
1500 | #: selection:banking.export.sepa.wizard,state:0 |
1501 | @@ -52,31 +45,8 @@ |
1502 | |
1503 | #. module: account_banking_sepa_credit_transfer |
1504 | #: help:banking.export.sepa.wizard,charge_bearer:0 |
1505 | -msgid "" |
1506 | -"Following service level : transaction charges are to be applied following " |
1507 | -"the rules agreed in the service level and/or scheme (SEPA Core messages must " |
1508 | -"use this). Shared : transaction charges on the debtor side are to be borne " |
1509 | -"by the debtor, transaction charges on the creditor side are to be borne by " |
1510 | -"the creditor. Borne by creditor : all transaction charges are to be borne by " |
1511 | -"the creditor. Borne by debtor : all transaction charges are to be borne by " |
1512 | -"the debtor." |
1513 | -msgstr "" |
1514 | -"Suivant le niveau de service : la répartition des frais bancaires suit les " |
1515 | -"règles pré-établies dans le schema ou dans le contrat avec la banque (les " |
1516 | -"messages SEPA Core doivent utiliser ce paramètre). Partagés : les frais " |
1517 | -"bancaires côté débiteur sont à la charge du débiteur, les frais bancaires " |
1518 | -"côté créancier sont à la charge du créancier. Supportés par le créancier : " |
1519 | -"tous les frais bancaires sont à la charge du créancier. Supportés par le " |
1520 | -"débiteur : tous les frais bancaires sont à la charge du débiteur." |
1521 | - |
1522 | -#. module: account_banking_sepa_credit_transfer |
1523 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:117 |
1524 | -#, python-format |
1525 | -msgid "" |
1526 | -"Cannot compute the '%s' of the Payment Line with Invoice Reference '%s'." |
1527 | -msgstr "" |
1528 | -"Impossible de générer le '%s' de la ligne de paiement ayant la référence de " |
1529 | -"facture '%s'." |
1530 | +msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." |
1531 | +msgstr "Suivant le niveau de service : la répartition des frais bancaires suit les règles pré-établies dans le schema ou dans le contrat avec la banque (les messages SEPA Core doivent utiliser ce paramètre). Partagés : les frais bancaires côté débiteur sont à la charge du débiteur, les frais bancaires côté créancier sont à la charge du créancier. Supportés par le créancier : tous les frais bancaires sont à la charge du créancier. Supportés par le débiteur : tous les frais bancaires sont à la charge du débiteur." |
1532 | |
1533 | #. module: account_banking_sepa_credit_transfer |
1534 | #: selection:banking.export.sepa,charge_bearer:0 |
1535 | @@ -91,9 +61,14 @@ |
1536 | msgstr "Débit groupé" |
1537 | |
1538 | #. module: account_banking_sepa_credit_transfer |
1539 | +#: selection:banking.export.sepa,state:0 |
1540 | +msgid "Sent" |
1541 | +msgstr "Envoyé" |
1542 | + |
1543 | +#. module: account_banking_sepa_credit_transfer |
1544 | #: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa_wizard |
1545 | -msgid "Export SEPA Credit Transfer XML file" |
1546 | -msgstr "Exporte the fichier de virement SEPA XML" |
1547 | +msgid "Export SEPA Credit Transfer File" |
1548 | +msgstr "Exporte le fichier de virement SEPA" |
1549 | |
1550 | #. module: account_banking_sepa_credit_transfer |
1551 | #: view:banking.export.sepa:0 |
1552 | @@ -123,24 +98,6 @@ |
1553 | msgstr "Supportés par le destinataire" |
1554 | |
1555 | #. module: account_banking_sepa_credit_transfer |
1556 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:122 |
1557 | -#, python-format |
1558 | -msgid "Cannot compute the '%s'." |
1559 | -msgstr "Impossible de générer le '%s'." |
1560 | - |
1561 | -#. module: account_banking_sepa_credit_transfer |
1562 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:126 |
1563 | -#, python-format |
1564 | -msgid "The type of the field '%s' is %s. It should be a string or unicode." |
1565 | -msgstr "" |
1566 | -"Le champ '%s' est de type %s. Le type devrait être string ou unicode." |
1567 | - |
1568 | -#. module: account_banking_sepa_credit_transfer |
1569 | -#: selection:banking.export.sepa,state:0 |
1570 | -msgid "Sent" |
1571 | -msgstr "Envoyé" |
1572 | - |
1573 | -#. module: account_banking_sepa_credit_transfer |
1574 | #: view:banking.export.sepa.wizard:0 |
1575 | msgid "Validate" |
1576 | msgstr "Valider" |
1577 | @@ -151,33 +108,14 @@ |
1578 | msgstr "Générer" |
1579 | |
1580 | #. module: account_banking_sepa_credit_transfer |
1581 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:169 |
1582 | -#, python-format |
1583 | -msgid "" |
1584 | -"The generated XML file is not valid against the official XML Schema " |
1585 | -"Definition. The generated XML file and the full error have been written in " |
1586 | -"the server logs. Here is the error, which may give you an idea on the cause " |
1587 | -"of the problem : %s" |
1588 | -msgstr "" |
1589 | -"Le fichier XML généré n'est pas valide par rapport à la Définition du Schéma " |
1590 | -"XML officiel. Le fichier XML généré et le message d'erreur complet ont été " |
1591 | -"écrits dans les logs du serveur. Voici l'erreur, qui vous donnera peut-être " |
1592 | -"une idée sur la cause du problème : %s" |
1593 | - |
1594 | -#. module: account_banking_sepa_credit_transfer |
1595 | #: selection:banking.export.sepa,charge_bearer:0 |
1596 | #: selection:banking.export.sepa.wizard,charge_bearer:0 |
1597 | msgid "Borne by Debtor" |
1598 | msgstr "Supportés par l'émetteur" |
1599 | |
1600 | #. module: account_banking_sepa_credit_transfer |
1601 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90 |
1602 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:116 |
1603 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:121 |
1604 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:130 |
1605 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:168 |
1606 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:206 |
1607 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:350 |
1608 | +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:128 |
1609 | +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:245 |
1610 | #, python-format |
1611 | msgid "Error:" |
1612 | msgstr "Erreur :" |
1613 | @@ -200,24 +138,15 @@ |
1614 | msgstr "Génération du fichier SEPA" |
1615 | |
1616 | #. module: account_banking_sepa_credit_transfer |
1617 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:125 |
1618 | -#, python-format |
1619 | -msgid "Field type error:" |
1620 | -msgstr "Erreur dans le type de champ:" |
1621 | - |
1622 | -#. module: account_banking_sepa_credit_transfer |
1623 | #: model:ir.model,name:account_banking_sepa_credit_transfer.model_banking_export_sepa |
1624 | msgid "SEPA export" |
1625 | msgstr "Export SEPA" |
1626 | |
1627 | #. module: account_banking_sepa_credit_transfer |
1628 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:351 |
1629 | +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:246 |
1630 | #, python-format |
1631 | -msgid "" |
1632 | -"Missing Bank Account on invoice '%s' (payment order line reference '%s')." |
1633 | -msgstr "" |
1634 | -"Compte bancaire manquant sur la facture '%s' (référence de la ligne de " |
1635 | -"paiement : '%s')." |
1636 | +msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')." |
1637 | +msgstr "Compte bancaire manquant sur la facture '%s' (référence de la ligne de paiement : '%s')." |
1638 | |
1639 | #. module: account_banking_sepa_credit_transfer |
1640 | #: field:banking.export.sepa,file:0 |
1641 | @@ -226,47 +155,15 @@ |
1642 | msgstr "Fichier SEPA XML" |
1643 | |
1644 | #. module: account_banking_sepa_credit_transfer |
1645 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:131 |
1646 | -#, python-format |
1647 | -msgid "The '%s' is empty or 0. It should have a non-null value." |
1648 | -msgstr "Le '%s' est vide ou égal à 0. La valeur devrait être non nulle." |
1649 | - |
1650 | -#. module: account_banking_sepa_credit_transfer |
1651 | #: help:banking.export.sepa,charge_bearer:0 |
1652 | -msgid "" |
1653 | -"Following service level : transaction charges are to be applied following " |
1654 | -"the rules agreed in the service level and/or scheme (SEPA Core messages must " |
1655 | -"use this). Shared : transaction charges on the creditor side are to be borne " |
1656 | -"by the creditor, transaction charges on the debtor side are to be borne by " |
1657 | -"the debtor. Borne by creditor : all transaction charges are to be borne by " |
1658 | -"the creditor. Borne by debtor : all transaction charges are to be borne by " |
1659 | -"the debtor." |
1660 | -msgstr "" |
1661 | -"Suivant le niveau de service : la répartition des frais bancaires suit les " |
1662 | -"règles pré-établies dans le schema ou dans le contrat avec la banque (les " |
1663 | -"messages SEPA Core doivent utiliser ce paramètre). Partagés : les frais " |
1664 | -"bancaires côté débiteur sont à la charge du débiteur, les frais bancaires " |
1665 | -"côté créancier sont à la charge du créancier. Supportés par le créancier : " |
1666 | -"tous les frais bancaires sont à la charge du créancier. Supportés par le " |
1667 | -"débiteur : tous les frais bancaires sont à la charge du débiteur." |
1668 | - |
1669 | -#. module: account_banking_sepa_credit_transfer |
1670 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:207 |
1671 | -#, python-format |
1672 | -msgid "" |
1673 | -"Payment Type Code '%s' is not supported. The only Payment Type Codes " |
1674 | -"supported for SEPA Credit Transfers are 'pain.001.001.02', " |
1675 | -"'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'." |
1676 | -msgstr "" |
1677 | -"Le code du Type de paiement '%s' n'est pas supporté. Les seuls codes de Type " |
1678 | -"de paiement supportés pour les virements SEPA sont 'pain.001.001.02', " |
1679 | -"'pain.001.001.03', 'pain.001.001.04' et 'pain.001.001.05'." |
1680 | - |
1681 | -#. module: account_banking_sepa_credit_transfer |
1682 | -#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:90 |
1683 | -#, python-format |
1684 | -msgid "This IBAN is not valid : %s" |
1685 | -msgstr "Cet IBAN n'est pas valide : %s" |
1686 | +msgid "Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the creditor side are to be borne by the creditor, transaction charges on the debtor side are to be borne by the debtor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor." |
1687 | +msgstr "Suivant le niveau de service : la répartition des frais bancaires suit les règles pré-établies dans le schema ou dans le contrat avec la banque (les messages SEPA Core doivent utiliser ce paramètre). Partagés : les frais bancaires côté débiteur sont à la charge du débiteur, les frais bancaires côté créancier sont à la charge du créancier. Supportés par le créancier : tous les frais bancaires sont à la charge du créancier. Supportés par le débiteur : tous les frais bancaires sont à la charge du débiteur." |
1688 | + |
1689 | +#. module: account_banking_sepa_credit_transfer |
1690 | +#: code:addons/account_banking_sepa_credit_transfer/wizard/export_sepa.py:129 |
1691 | +#, python-format |
1692 | +msgid "Payment Type Code '%s' is not supported. The only Payment Type Codes supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' and 'pain.001.001.05'." |
1693 | +msgstr "Le code du Type de paiement '%s' n'est pas supporté. Les seuls codes de Type de paiement supportés pour les virements SEPA sont 'pain.001.001.02', 'pain.001.001.03', 'pain.001.001.04' et 'pain.001.001.05'." |
1694 | |
1695 | #. module: account_banking_sepa_credit_transfer |
1696 | #: view:banking.export.sepa:0 |
1697 | @@ -290,26 +187,8 @@ |
1698 | #. module: account_banking_sepa_credit_transfer |
1699 | #: help:banking.export.sepa,batch_booking:0 |
1700 | #: help:banking.export.sepa.wizard,batch_booking:0 |
1701 | -msgid "" |
1702 | -"If true, the bank statement will display only one debit line for all the " |
1703 | -"wire transfers of the SEPA XML file ; if false, the bank statement will " |
1704 | -"display one debit line per wire transfer of the SEPA XML file." |
1705 | -msgstr "" |
1706 | -"Si coché, le relevé de compte ne comportera qu'une ligne de débit pour tous " |
1707 | -"les virements du fichier SEPA XML ; si non coché, le relevé de compte " |
1708 | -"comportera une ligne de débit pour chaque virement du fichier SEPA XML." |
1709 | - |
1710 | -#. module: account_banking_sepa_credit_transfer |
1711 | -#: help:banking.export.sepa.wizard,prefered_exec_date:0 |
1712 | -msgid "" |
1713 | -"This is the date on which the file should be processed by the bank. Please " |
1714 | -"keep in mind that banks only execute on working days and typically use a " |
1715 | -"delay of two days between execution date and effective transfer date." |
1716 | -msgstr "" |
1717 | -"C'est la date à laquelle le fichier doit être traité par la banque. Gardez " |
1718 | -"en tête que les banques réalisent des traitements seulement les jours ouvrés " |
1719 | -"et ont habituellement un délai de 2 jours entre la date de traitement et la " |
1720 | -"date du transfert effectif." |
1721 | +msgid "If true, the bank statement will display only one debit line for all the wire transfers of the SEPA XML file ; if false, the bank statement will display one debit line per wire transfer of the SEPA XML file." |
1722 | +msgstr "Si coché, le relevé de compte ne comportera qu'une ligne de débit pour tous les virements du fichier SEPA XML ; si non coché, le relevé de compte comportera une ligne de débit pour chaque virement du fichier SEPA XML." |
1723 | |
1724 | #. module: account_banking_sepa_credit_transfer |
1725 | #: field:banking.export.sepa.wizard,file:0 |
1726 | @@ -326,88 +205,3 @@ |
1727 | msgid "Generation Date" |
1728 | msgstr "Date de génération" |
1729 | |
1730 | -#~ msgid "SEPA XML file" |
1731 | -#~ msgstr "Fichier SEPA XML" |
1732 | - |
1733 | -#~ msgid "Payment order" |
1734 | -#~ msgstr "Ordre de paiement" |
1735 | - |
1736 | -#~ msgid "" |
1737 | -#~ "This is the message identification of the entire SEPA XML file. 35 " |
1738 | -#~ "characters max." |
1739 | -#~ msgstr "" |
1740 | -#~ "Ceci est le libellé d'identification du fichier SEPA XML. 35 caractères " |
1741 | -#~ "maximum." |
1742 | - |
1743 | -#~ msgid "Prefered execution date" |
1744 | -#~ msgstr "Date d'exécution demandée" |
1745 | - |
1746 | -#~ msgid "Generation date" |
1747 | -#~ msgstr "Date de génération" |
1748 | - |
1749 | -#~ msgid "Message identification" |
1750 | -#~ msgstr "Libellé d'identification" |
1751 | - |
1752 | -#~ msgid "Total amount" |
1753 | -#~ msgstr "Montant total" |
1754 | - |
1755 | -#~ msgid "" |
1756 | -#~ "Shared : transaction charges on the sender side are to be borne by the " |
1757 | -#~ "debtor, transaction charges on the receiver side are to be borne by the " |
1758 | -#~ "creditor (most transfers use this). Borne by creditor : all transaction " |
1759 | -#~ "charges are to be borne by the creditor. Borne by debtor : all transaction " |
1760 | -#~ "charges are to be borne by the debtor. Following service level : transaction " |
1761 | -#~ "charges are to be applied following the rules agreed in the service level " |
1762 | -#~ "and/or scheme." |
1763 | -#~ msgstr "" |
1764 | -#~ "Partagés : les frais bancaires côté émetteur sont à la charge de l'émetteur " |
1765 | -#~ "et les frais bancaires côté destinataire sont à la charge du destinataire " |
1766 | -#~ "(la plupart des virements utilisent cette répartition). Supportés par le " |
1767 | -#~ "destinataire : tous les frais bancaires sont à la charge du destinataire. " |
1768 | -#~ "Supportés par l'émetteur : tous les frais bancaires sont à la charge de " |
1769 | -#~ "l'émetteur. Suivant le niveau de service : la répartition des frais " |
1770 | -#~ "bancaires suit les règles pré-établies dans le contrat avec la banque." |
1771 | - |
1772 | -#~ msgid "Borne by creditor" |
1773 | -#~ msgstr "Supportés par le destinataire" |
1774 | - |
1775 | -#~ msgid "Payment orders" |
1776 | -#~ msgstr "Ordres de paiement" |
1777 | - |
1778 | -#~ msgid "SEPA XML file generation" |
1779 | -#~ msgstr "Génération du fichier SEPA XML" |
1780 | - |
1781 | -#~ msgid "Reference for further communication" |
1782 | -#~ msgstr "Référence pour communication ultérieure" |
1783 | - |
1784 | -#~ msgid "Processing details" |
1785 | -#~ msgstr "Paramètres" |
1786 | - |
1787 | -#~ msgid "Borne by debtor" |
1788 | -#~ msgstr "Supportés par l'émetteur" |
1789 | - |
1790 | -#~ msgid "Number of transactions" |
1791 | -#~ msgstr "Nombre de transactions" |
1792 | - |
1793 | -#~ msgid "Following service level" |
1794 | -#~ msgstr "Suivant le niveau de service" |
1795 | - |
1796 | -#~ msgid "Charge bearer" |
1797 | -#~ msgstr "Répartition des frais" |
1798 | - |
1799 | -#, python-format |
1800 | -#~ msgid "" |
1801 | -#~ "Payment Type Code '%s' is not supported. The only Payment Type Codes " |
1802 | -#~ "supported for SEPA Credit Transfers are 'pain.001.001.02', 'pain.001.001.03' " |
1803 | -#~ "and 'pain.001.001.04'." |
1804 | -#~ msgstr "" |
1805 | -#~ "Le code '%s' pour le Type de Paiment n'est pas supporté. Les seuls codes de " |
1806 | -#~ "Types de Paiement supportés pour les virements SEPA sont 'pain.001.001.02', " |
1807 | -#~ "'pain.001.001.03' et 'pain.001.001.04'." |
1808 | - |
1809 | -#, python-format |
1810 | -#~ msgid "Error :" |
1811 | -#~ msgstr "Erreur :" |
1812 | - |
1813 | -#~ msgid "Batch booking" |
1814 | -#~ msgstr "Débit groupé" |
1815 | |
1816 | === modified file 'account_banking_sepa_credit_transfer/wizard/export_sepa.py' |
1817 | --- account_banking_sepa_credit_transfer/wizard/export_sepa.py 2013-11-12 21:38:21 +0000 |
1818 | +++ account_banking_sepa_credit_transfer/wizard/export_sepa.py 2014-01-13 12:42:46 +0000 |
1819 | @@ -22,20 +22,14 @@ |
1820 | |
1821 | |
1822 | from openerp.osv import orm, fields |
1823 | -import base64 |
1824 | -from datetime import datetime |
1825 | from openerp.tools.translate import _ |
1826 | -from openerp.tools.safe_eval import safe_eval |
1827 | -from openerp import tools, netsvc |
1828 | +from openerp import netsvc |
1829 | from lxml import etree |
1830 | -import logging |
1831 | -from unidecode import unidecode |
1832 | - |
1833 | -_logger = logging.getLogger(__name__) |
1834 | |
1835 | |
1836 | class banking_export_sepa_wizard(orm.TransientModel): |
1837 | _name = 'banking.export.sepa.wizard' |
1838 | + _inherit = ['banking.export.pain'] |
1839 | _description = 'Export SEPA Credit Transfer File' |
1840 | |
1841 | _columns = { |
1842 | @@ -45,17 +39,24 @@ |
1843 | ], 'State', readonly=True), |
1844 | 'batch_booking': fields.boolean( |
1845 | 'Batch Booking', |
1846 | - 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."), |
1847 | - 'prefered_exec_date': fields.date( |
1848 | - 'Prefered Execution Date', |
1849 | - 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.'), |
1850 | + help="If true, the bank statement will display only one debit " |
1851 | + "line for all the wire transfers of the SEPA XML file ; if " |
1852 | + "false, the bank statement will display one debit line per wire " |
1853 | + "transfer of the SEPA XML file."), |
1854 | 'charge_bearer': fields.selection([ |
1855 | ('SLEV', 'Following Service Level'), |
1856 | ('SHAR', 'Shared'), |
1857 | ('CRED', 'Borne by Creditor'), |
1858 | ('DEBT', 'Borne by Debtor'), |
1859 | ], 'Charge Bearer', required=True, |
1860 | - help='Following service level : transaction charges are to be applied following the rules agreed in the service level and/or scheme (SEPA Core messages must use this). Shared : transaction charges on the debtor side are to be borne by the debtor, transaction charges on the creditor side are to be borne by the creditor. Borne by creditor : all transaction charges are to be borne by the creditor. Borne by debtor : all transaction charges are to be borne by the debtor.'), |
1861 | + help="Following service level : transaction charges are to be " |
1862 | + "applied following the rules agreed in the service level and/or " |
1863 | + "scheme (SEPA Core messages must use this). Shared : transaction " |
1864 | + "charges on the debtor side are to be borne by the debtor, " |
1865 | + "transaction charges on the creditor side are to be borne by " |
1866 | + "the creditor. Borne by creditor : all transaction charges are " |
1867 | + "to be borne by the creditor. Borne by debtor : all transaction " |
1868 | + "charges are to be borne by the debtor."), |
1869 | 'nb_transactions': fields.related( |
1870 | 'file_id', 'nb_transactions', type='integer', |
1871 | string='Number of Transactions', readonly=True), |
1872 | @@ -79,16 +80,6 @@ |
1873 | 'state': 'create', |
1874 | } |
1875 | |
1876 | - def _validate_iban(self, cr, uid, iban, context=None): |
1877 | - '''if IBAN is valid, returns IBAN |
1878 | - if IBAN is NOT valid, raises an error message''' |
1879 | - partner_bank_obj = self.pool.get('res.partner.bank') |
1880 | - if partner_bank_obj.is_iban_valid(cr, uid, iban, context=context): |
1881 | - return iban.replace(' ', '') |
1882 | - else: |
1883 | - raise orm.except_orm( |
1884 | - _('Error:'), _("This IBAN is not valid : %s") % iban) |
1885 | - |
1886 | def create(self, cr, uid, vals, context=None): |
1887 | payment_order_ids = context.get('active_ids', []) |
1888 | vals.update({ |
1889 | @@ -97,85 +88,16 @@ |
1890 | return super(banking_export_sepa_wizard, self).create( |
1891 | cr, uid, vals, context=context) |
1892 | |
1893 | - def _prepare_field( |
1894 | - self, cr, uid, field_name, field_value, eval_ctx, max_size=0, |
1895 | - context=None): |
1896 | - '''This function is designed to be inherited !''' |
1897 | - assert isinstance(eval_ctx, dict), 'eval_ctx must contain a dict' |
1898 | - try: |
1899 | - # SEPA uses XML ; XML = UTF-8 ; UTF-8 = support for all characters |
1900 | - # But we are dealing with banks... |
1901 | - # and many banks don't want non-ASCCI characters ! |
1902 | - # cf section 1.4 "Character set" of the SEPA Credit Transfer |
1903 | - # Scheme Customer-to-bank guidelines |
1904 | - value = unidecode(safe_eval(field_value, eval_ctx)) |
1905 | - except: |
1906 | - line = eval_ctx.get('line') |
1907 | - if line: |
1908 | - raise orm.except_orm( |
1909 | - _('Error:'), |
1910 | - _("Cannot compute the '%s' of the Payment Line with Invoice Reference '%s'.") |
1911 | - % (field_name, self.pool['account.invoice'].name_get(cr, uid, [line.ml_inv_ref.id], context=context)[0][1])) |
1912 | - else: |
1913 | - raise orm.except_orm( |
1914 | - _('Error:'), |
1915 | - _("Cannot compute the '%s'.") % field_name) |
1916 | - if not isinstance(value, (str, unicode)): |
1917 | - raise orm.except_orm( |
1918 | - _('Field type error:'), |
1919 | - _("The type of the field '%s' is %s. It should be a string or unicode.") |
1920 | - % (field_name, type(value))) |
1921 | - if not value: |
1922 | - raise orm.except_orm( |
1923 | - _('Error:'), |
1924 | - _("The '%s' is empty or 0. It should have a non-null value.") |
1925 | - % field_name) |
1926 | - if max_size and len(value) > max_size: |
1927 | - value = value[0:max_size] |
1928 | - return value |
1929 | - |
1930 | - def _prepare_export_sepa( |
1931 | - self, cr, uid, sepa_export, total_amount, transactions_count, |
1932 | - xml_string, context=None): |
1933 | - return { |
1934 | - 'batch_booking': sepa_export.batch_booking, |
1935 | - 'charge_bearer': sepa_export.charge_bearer, |
1936 | - 'prefered_exec_date': sepa_export.prefered_exec_date, |
1937 | - 'total_amount': total_amount, |
1938 | - 'nb_transactions': transactions_count, |
1939 | - 'file': base64.encodestring(xml_string), |
1940 | - 'payment_order_ids': [ |
1941 | - (6, 0, [x.id for x in sepa_export.payment_order_ids]) |
1942 | - ], |
1943 | - } |
1944 | - |
1945 | - def _validate_xml(self, cr, uid, xml_string, pain_flavor): |
1946 | - xsd_etree_obj = etree.parse( |
1947 | - tools.file_open( |
1948 | - 'account_banking_sepa_credit_transfer/data/%s.xsd' |
1949 | - % pain_flavor)) |
1950 | - official_pain_schema = etree.XMLSchema(xsd_etree_obj) |
1951 | - |
1952 | - try: |
1953 | - root_to_validate = etree.fromstring(xml_string) |
1954 | - official_pain_schema.assertValid(root_to_validate) |
1955 | - except Exception, e: |
1956 | - _logger.warning( |
1957 | - "The XML file is invalid against the XML Schema Definition") |
1958 | - _logger.warning(xml_string) |
1959 | - _logger.warning(e) |
1960 | - raise orm.except_orm( |
1961 | - _('Error:'), |
1962 | - _('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') |
1963 | - % str(e)) |
1964 | - return True |
1965 | - |
1966 | def create_sepa(self, cr, uid, ids, context=None): |
1967 | ''' |
1968 | Creates the SEPA Credit Transfer file. That's the important code ! |
1969 | ''' |
1970 | + if context is None: |
1971 | + context = {} |
1972 | sepa_export = self.browse(cr, uid, ids[0], context=context) |
1973 | pain_flavor = sepa_export.payment_order_ids[0].mode.type.code |
1974 | + convert_to_ascii = \ |
1975 | + sepa_export.payment_order_ids[0].mode.convert_to_ascii |
1976 | if pain_flavor == 'pain.001.001.02': |
1977 | bic_xml_tag = 'BIC' |
1978 | name_maxsize = 70 |
1979 | @@ -204,124 +126,98 @@ |
1980 | else: |
1981 | raise orm.except_orm( |
1982 | _('Error:'), |
1983 | - _("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'.") |
1984 | + _("Payment Type Code '%s' is not supported. The only " |
1985 | + "Payment Type Codes supported for SEPA Credit Transfers " |
1986 | + "are 'pain.001.001.02', 'pain.001.001.03', " |
1987 | + "'pain.001.001.04' and 'pain.001.001.05'.") |
1988 | % pain_flavor) |
1989 | - if sepa_export.prefered_exec_date: |
1990 | - my_requested_exec_date = sepa_export.prefered_exec_date |
1991 | - else: |
1992 | - my_requested_exec_date = fields.date.context_today( |
1993 | - self, cr, uid, context=context) |
1994 | + |
1995 | + gen_args = { |
1996 | + 'bic_xml_tag': bic_xml_tag, |
1997 | + 'name_maxsize': name_maxsize, |
1998 | + 'convert_to_ascii': convert_to_ascii, |
1999 | + 'payment_method': 'TRF', |
2000 | + 'pain_flavor': pain_flavor, |
2001 | + 'sepa_export': sepa_export, |
2002 | + 'file_obj': self.pool['banking.export.sepa'], |
2003 | + 'pain_xsd_file': |
2004 | + 'account_banking_sepa_credit_transfer/data/%s.xsd' |
2005 | + % pain_flavor, |
2006 | + } |
2007 | |
2008 | pain_ns = { |
2009 | 'xsi': 'http://www.w3.org/2001/XMLSchema-instance', |
2010 | None: 'urn:iso:std:iso:20022:tech:xsd:%s' % pain_flavor, |
2011 | } |
2012 | |
2013 | - root = etree.Element('Document', nsmap=pain_ns) |
2014 | - pain_root = etree.SubElement(root, root_xml_tag) |
2015 | - |
2016 | - my_company_name = self._prepare_field( |
2017 | - cr, uid, 'Company Name', |
2018 | - 'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name', |
2019 | - {'sepa_export': sepa_export}, name_maxsize, context=context) |
2020 | + xml_root = etree.Element('Document', nsmap=pain_ns) |
2021 | + pain_root = etree.SubElement(xml_root, root_xml_tag) |
2022 | + pain_03_to_05 = \ |
2023 | + ['pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05'] |
2024 | |
2025 | # A. Group header |
2026 | - group_header_1_0 = etree.SubElement(pain_root, 'GrpHdr') |
2027 | - message_identification_1_1 = etree.SubElement( |
2028 | - group_header_1_0, 'MsgId') |
2029 | - message_identification_1_1.text = self._prepare_field( |
2030 | - cr, uid, 'Message Identification', |
2031 | - 'sepa_export.payment_order_ids[0].reference', |
2032 | - {'sepa_export': sepa_export}, 35, context=context) |
2033 | - creation_date_time_1_2 = etree.SubElement(group_header_1_0, 'CreDtTm') |
2034 | - creation_date_time_1_2.text = datetime.strftime( |
2035 | - datetime.today(), '%Y-%m-%dT%H:%M:%S') |
2036 | - if pain_flavor == 'pain.001.001.02': |
2037 | - # batch_booking is in "Group header" with pain.001.001.02 |
2038 | - # and in "Payment info" in pain.001.001.03/04 |
2039 | - batch_booking = etree.SubElement(group_header_1_0, 'BtchBookg') |
2040 | - batch_booking.text = str(sepa_export.batch_booking).lower() |
2041 | - nb_of_transactions_1_6 = etree.SubElement( |
2042 | - group_header_1_0, 'NbOfTxs') |
2043 | - control_sum_1_7 = etree.SubElement(group_header_1_0, 'CtrlSum') |
2044 | - # Grpg removed in pain.001.001.03 |
2045 | - if pain_flavor == 'pain.001.001.02': |
2046 | - grouping = etree.SubElement(group_header_1_0, 'Grpg') |
2047 | - grouping.text = 'GRPD' |
2048 | - initiating_party_1_8 = etree.SubElement(group_header_1_0, 'InitgPty') |
2049 | - initiating_party_name = etree.SubElement(initiating_party_1_8, 'Nm') |
2050 | - initiating_party_name.text = my_company_name |
2051 | - |
2052 | - # B. Payment info |
2053 | - payment_info_2_0 = etree.SubElement(pain_root, 'PmtInf') |
2054 | - payment_info_identification_2_1 = etree.SubElement( |
2055 | - payment_info_2_0, 'PmtInfId') |
2056 | - payment_info_identification_2_1.text = self._prepare_field( |
2057 | - cr, uid, 'Payment Information Identification', |
2058 | - "sepa_export.payment_order_ids[0].reference", |
2059 | - {'sepa_export': sepa_export}, 35, context=context) |
2060 | - payment_method_2_2 = etree.SubElement(payment_info_2_0, 'PmtMtd') |
2061 | - payment_method_2_2.text = 'TRF' |
2062 | - if pain_flavor in [ |
2063 | - 'pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05']: |
2064 | - # batch_booking is in "Group header" with pain.001.001.02 |
2065 | - # and in "Payment info" in pain.001.001.03/04 |
2066 | - batch_booking_2_3 = etree.SubElement(payment_info_2_0, 'BtchBookg') |
2067 | - batch_booking_2_3.text = str(sepa_export.batch_booking).lower() |
2068 | - # It may seem surprising, but the |
2069 | - # "SEPA Credit Transfer Scheme Customer-to-bank Implementation |
2070 | - # guidelines" v6.0 says that control sum and nb_of_transactions |
2071 | - # should be present at both "group header" level and "payment info" |
2072 | - # level. This seems to be confirmed by the tests carried out at |
2073 | - # BNP Paribas in PAIN v001.001.03 |
2074 | - if pain_flavor in [ |
2075 | - 'pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05']: |
2076 | - nb_of_transactions_2_4 = etree.SubElement( |
2077 | - payment_info_2_0, 'NbOfTxs') |
2078 | - control_sum_2_5 = etree.SubElement(payment_info_2_0, 'CtrlSum') |
2079 | - payment_type_info_2_6 = etree.SubElement(payment_info_2_0, 'PmtTpInf') |
2080 | - service_level_2_8 = etree.SubElement(payment_type_info_2_6, 'SvcLvl') |
2081 | - service_level_code_2_9 = etree.SubElement(service_level_2_8, 'Cd') |
2082 | - service_level_code_2_9.text = 'SEPA' |
2083 | - requested_exec_date_2_17 = etree.SubElement( |
2084 | - payment_info_2_0, 'ReqdExctnDt') |
2085 | - requested_exec_date_2_17.text = my_requested_exec_date |
2086 | - debtor_2_19 = etree.SubElement(payment_info_2_0, 'Dbtr') |
2087 | - debtor_name = etree.SubElement(debtor_2_19, 'Nm') |
2088 | - debtor_name.text = my_company_name |
2089 | - debtor_account_2_20 = etree.SubElement(payment_info_2_0, 'DbtrAcct') |
2090 | - debtor_account_id = etree.SubElement(debtor_account_2_20, 'Id') |
2091 | - debtor_account_iban = etree.SubElement(debtor_account_id, 'IBAN') |
2092 | - debtor_account_iban.text = self._validate_iban( |
2093 | - cr, uid, self._prepare_field( |
2094 | - cr, uid, 'Company IBAN', |
2095 | - 'sepa_export.payment_order_ids[0].mode.bank_id.acc_number', |
2096 | - {'sepa_export': sepa_export}, context=context), |
2097 | - context=context) |
2098 | - debtor_agent_2_21 = etree.SubElement(payment_info_2_0, 'DbtrAgt') |
2099 | - debtor_agent_institution = etree.SubElement( |
2100 | - debtor_agent_2_21, 'FinInstnId') |
2101 | - debtor_agent_bic = etree.SubElement( |
2102 | - debtor_agent_institution, bic_xml_tag) |
2103 | - # TODO validate BIC with pattern |
2104 | - # [A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1} |
2105 | - # because OpenERP doesn't have a constraint on BIC |
2106 | - debtor_agent_bic.text = self._prepare_field( |
2107 | - cr, uid, 'Company BIC', |
2108 | - 'sepa_export.payment_order_ids[0].mode.bank_id.bank.bic', |
2109 | - {'sepa_export': sepa_export}, context=context) |
2110 | - charge_bearer_2_24 = etree.SubElement(payment_info_2_0, 'ChrgBr') |
2111 | - charge_bearer_2_24.text = sepa_export.charge_bearer |
2112 | - |
2113 | - transactions_count = 0 |
2114 | + group_header_1_0, nb_of_transactions_1_6, control_sum_1_7 = \ |
2115 | + self.generate_group_header_block( |
2116 | + cr, uid, pain_root, gen_args, context=context) |
2117 | + |
2118 | + transactions_count_1_6 = 0 |
2119 | total_amount = 0.0 |
2120 | - amount_control_sum = 0.0 |
2121 | - # Iterate on payment orders |
2122 | + amount_control_sum_1_7 = 0.0 |
2123 | + lines_per_group = {} |
2124 | + # key = (requested_date, priority) |
2125 | + # values = list of lines as object |
2126 | + today = fields.date.context_today(self, cr, uid, context=context) |
2127 | for payment_order in sepa_export.payment_order_ids: |
2128 | total_amount = total_amount + payment_order.total |
2129 | - # Iterate each payment lines |
2130 | for line in payment_order.line_ids: |
2131 | - transactions_count += 1 |
2132 | + priority = line.priority |
2133 | + if payment_order.date_prefered == 'due': |
2134 | + requested_date = line.ml_maturity_date or today |
2135 | + elif payment_order.date_prefered == 'fixed': |
2136 | + requested_date = payment_order.date_scheduled or today |
2137 | + else: |
2138 | + requested_date = today |
2139 | + key = (requested_date, priority) |
2140 | + if key in lines_per_group: |
2141 | + lines_per_group[key].append(line) |
2142 | + else: |
2143 | + lines_per_group[key] = [line] |
2144 | + # Write requested_date on 'Payment date' of the pay line |
2145 | + if requested_date != line.date: |
2146 | + self.pool['payment.line'].write( |
2147 | + cr, uid, line.id, |
2148 | + {'date': requested_date}, context=context) |
2149 | + |
2150 | + for (requested_date, priority), lines in lines_per_group.items(): |
2151 | + # B. Payment info |
2152 | + payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5 = \ |
2153 | + self.generate_start_payment_info_block( |
2154 | + cr, uid, pain_root, |
2155 | + "sepa_export.payment_order_ids[0].reference + '-' " |
2156 | + "+ requested_date.replace('-', '') + '-' + priority", |
2157 | + priority, False, False, requested_date, { |
2158 | + 'sepa_export': sepa_export, |
2159 | + 'priority': priority, |
2160 | + 'requested_date': requested_date, |
2161 | + }, gen_args, context=context) |
2162 | + |
2163 | + self.generate_party_block( |
2164 | + cr, uid, payment_info_2_0, 'Dbtr', 'B', |
2165 | + 'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.' |
2166 | + 'name', |
2167 | + 'sepa_export.payment_order_ids[0].mode.bank_id.acc_number', |
2168 | + 'sepa_export.payment_order_ids[0].mode.bank_id.bank.bic', |
2169 | + {'sepa_export': sepa_export}, |
2170 | + gen_args, context=context) |
2171 | + |
2172 | + charge_bearer_2_24 = etree.SubElement(payment_info_2_0, 'ChrgBr') |
2173 | + charge_bearer_2_24.text = sepa_export.charge_bearer |
2174 | + |
2175 | + transactions_count_2_4 = 0 |
2176 | + amount_control_sum_2_5 = 0.0 |
2177 | + for line in lines: |
2178 | + transactions_count_1_6 += 1 |
2179 | + transactions_count_2_4 += 1 |
2180 | # C. Credit Transfer Transaction Info |
2181 | credit_transfer_transaction_info_2_27 = etree.SubElement( |
2182 | payment_info_2_0, 'CdtTrfTxInf') |
2183 | @@ -331,104 +227,54 @@ |
2184 | payment_identification_2_28, 'EndToEndId') |
2185 | end2end_identification_2_30.text = self._prepare_field( |
2186 | cr, uid, 'End to End Identification', 'line.name', |
2187 | - {'line': line}, 35, context=context) |
2188 | + {'line': line}, 35, gen_args=gen_args, |
2189 | + context=context) |
2190 | currency_name = self._prepare_field( |
2191 | cr, uid, 'Currency Code', 'line.currency.name', |
2192 | - {'line': line}, 3, context=context) |
2193 | + {'line': line}, 3, gen_args=gen_args, |
2194 | + context=context) |
2195 | amount_2_42 = etree.SubElement( |
2196 | credit_transfer_transaction_info_2_27, 'Amt') |
2197 | instructed_amount_2_43 = etree.SubElement( |
2198 | amount_2_42, 'InstdAmt', Ccy=currency_name) |
2199 | instructed_amount_2_43.text = '%.2f' % line.amount_currency |
2200 | - amount_control_sum += line.amount_currency |
2201 | - creditor_agent_2_77 = etree.SubElement( |
2202 | - credit_transfer_transaction_info_2_27, 'CdtrAgt') |
2203 | - creditor_agent_institution = etree.SubElement( |
2204 | - creditor_agent_2_77, 'FinInstnId') |
2205 | + amount_control_sum_1_7 += line.amount_currency |
2206 | + amount_control_sum_2_5 += line.amount_currency |
2207 | + |
2208 | if not line.bank_id: |
2209 | raise orm.except_orm( |
2210 | _('Error:'), |
2211 | - _("Missing Bank Account on invoice '%s' (payment order line reference '%s').") |
2212 | + _("Missing Bank Account on invoice '%s' (payment " |
2213 | + "order line reference '%s').") |
2214 | % (line.ml_inv_ref.number, line.name)) |
2215 | - creditor_agent_bic = etree.SubElement( |
2216 | - creditor_agent_institution, bic_xml_tag) |
2217 | - creditor_agent_bic.text = self._prepare_field( |
2218 | - cr, uid, 'Customer BIC', 'line.bank_id.bank.bic', |
2219 | - {'line': line}, context=context) |
2220 | - creditor_2_79 = etree.SubElement( |
2221 | - credit_transfer_transaction_info_2_27, 'Cdtr') |
2222 | - creditor_name = etree.SubElement(creditor_2_79, 'Nm') |
2223 | - creditor_name.text = self._prepare_field( |
2224 | - cr, uid, 'Customer Name', 'line.partner_id.name', |
2225 | - {'line': line}, name_maxsize, context=context) |
2226 | - creditor_account_2_80 = etree.SubElement( |
2227 | - credit_transfer_transaction_info_2_27, 'CdtrAcct') |
2228 | - creditor_account_id = etree.SubElement( |
2229 | - creditor_account_2_80, 'Id') |
2230 | - creditor_account_iban = etree.SubElement( |
2231 | - creditor_account_id, 'IBAN') |
2232 | - creditor_account_iban.text = self._validate_iban( |
2233 | - cr, uid, self._prepare_field( |
2234 | - cr, uid, 'Customer IBAN', |
2235 | - 'line.bank_id.acc_number', {'line': line}, |
2236 | - context=context), |
2237 | + self.generate_party_block( |
2238 | + cr, uid, credit_transfer_transaction_info_2_27, 'Cdtr', |
2239 | + 'C', 'line.partner_id.name', 'line.bank_id.acc_number', |
2240 | + 'line.bank_id.bank.bic', {'line': line}, gen_args, |
2241 | context=context) |
2242 | - remittance_info_2_91 = etree.SubElement( |
2243 | - credit_transfer_transaction_info_2_27, 'RmtInf') |
2244 | - # switch to Structured (Strdr) ? |
2245 | - # If we do it, beware that the format is not the same |
2246 | - # between pain 02 and pain 03 |
2247 | - remittance_info_unstructured_2_99 = etree.SubElement( |
2248 | - remittance_info_2_91, 'Ustrd') |
2249 | - remittance_info_unstructured_2_99.text = self._prepare_field( |
2250 | - cr, uid, 'Remittance Information', 'line.communication', |
2251 | - {'line': line}, 140, context=context) |
2252 | - |
2253 | - if pain_flavor in [ |
2254 | - 'pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05']: |
2255 | - nb_of_transactions_1_6.text = nb_of_transactions_2_4.text = \ |
2256 | - str(transactions_count) |
2257 | - control_sum_1_7.text = control_sum_2_5.text = \ |
2258 | - '%.2f' % amount_control_sum |
2259 | + |
2260 | + self.generate_remittance_info_block( |
2261 | + cr, uid, credit_transfer_transaction_info_2_27, |
2262 | + line, gen_args, context=context) |
2263 | + |
2264 | + if pain_flavor in pain_03_to_05: |
2265 | + nb_of_transactions_2_4.text = str(transactions_count_2_4) |
2266 | + control_sum_2_5.text = '%.2f' % amount_control_sum_2_5 |
2267 | + |
2268 | + if pain_flavor in pain_03_to_05: |
2269 | + nb_of_transactions_1_6.text = str(transactions_count_1_6) |
2270 | + control_sum_1_7.text = '%.2f' % amount_control_sum_1_7 |
2271 | else: |
2272 | - nb_of_transactions_1_6.text = str(transactions_count) |
2273 | - control_sum_1_7.text = '%.2f' % amount_control_sum |
2274 | - |
2275 | - xml_string = etree.tostring( |
2276 | - root, pretty_print=True, encoding='UTF-8', xml_declaration=True) |
2277 | - _logger.debug( |
2278 | - "Generated SEPA Credit Transfer XML file in format %s below" |
2279 | - % pain_flavor) |
2280 | - _logger.debug(xml_string) |
2281 | - self._validate_xml(cr, uid, xml_string, pain_flavor) |
2282 | - |
2283 | - # CREATE the banking.export.sepa record |
2284 | - file_id = self.pool.get('banking.export.sepa').create( |
2285 | - cr, uid, self._prepare_export_sepa( |
2286 | - cr, uid, sepa_export, total_amount, transactions_count, |
2287 | - xml_string, context=context), |
2288 | - context=context) |
2289 | - |
2290 | - self.write( |
2291 | - cr, uid, ids, { |
2292 | - 'file_id': file_id, |
2293 | - 'state': 'finish', |
2294 | - }, context=context) |
2295 | - |
2296 | - action = { |
2297 | - 'name': 'SEPA Credit Transfer File', |
2298 | - 'type': 'ir.actions.act_window', |
2299 | - 'view_type': 'form', |
2300 | - 'view_mode': 'form,tree', |
2301 | - 'res_model': self._name, |
2302 | - 'res_id': ids[0], |
2303 | - 'target': 'new', |
2304 | - } |
2305 | - return action |
2306 | + nb_of_transactions_1_6.text = str(transactions_count_1_6) |
2307 | + control_sum_1_7.text = '%.2f' % amount_control_sum_1_7 |
2308 | + |
2309 | + return self.finalize_sepa_file_creation( |
2310 | + cr, uid, ids, xml_root, total_amount, transactions_count_1_6, |
2311 | + gen_args, context=context) |
2312 | |
2313 | def cancel_sepa(self, cr, uid, ids, context=None): |
2314 | ''' |
2315 | - Cancel the SEPA PAIN: just drop the file |
2316 | + Cancel the SEPA file: just drop the file |
2317 | ''' |
2318 | sepa_export = self.browse(cr, uid, ids[0], context=context) |
2319 | self.pool.get('banking.export.sepa').unlink( |
2320 | @@ -437,7 +283,7 @@ |
2321 | |
2322 | def save_sepa(self, cr, uid, ids, context=None): |
2323 | ''' |
2324 | - Save the SEPA PAIN: send the done signal to all payment |
2325 | + Save the SEPA file: send the done signal to all payment |
2326 | orders in the file. With the default workflow, they will |
2327 | transition to 'done', while with the advanced workflow in |
2328 | account_banking_payment they will transition to 'sent' waiting |
2329 | |
2330 | === modified file 'account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml' |
2331 | --- account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml 2013-11-07 11:50:36 +0000 |
2332 | +++ account_banking_sepa_credit_transfer/wizard/export_sepa_view.xml 2014-01-13 12:42:46 +0000 |
2333 | @@ -15,7 +15,6 @@ |
2334 | <field name="state" invisible="True"/> |
2335 | <group states="create"> |
2336 | <field name="batch_booking" /> |
2337 | - <field name="prefered_exec_date" /> |
2338 | <field name="charge_bearer" /> |
2339 | </group> |
2340 | <group states="finish"> |
2341 | |
2342 | === added directory 'account_banking_sepa_direct_debit' |
2343 | === added file 'account_banking_sepa_direct_debit/__init__.py' |
2344 | --- account_banking_sepa_direct_debit/__init__.py 1970-01-01 00:00:00 +0000 |
2345 | +++ account_banking_sepa_direct_debit/__init__.py 2014-01-13 12:42:46 +0000 |
2346 | @@ -0,0 +1,25 @@ |
2347 | +# -*- encoding: utf-8 -*- |
2348 | +############################################################################## |
2349 | +# |
2350 | +# SEPA Direct Debit module for OpenERP |
2351 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
2352 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
2353 | +# |
2354 | +# This program is free software: you can redistribute it and/or modify |
2355 | +# it under the terms of the GNU Affero General Public License as |
2356 | +# published by the Free Software Foundation, either version 3 of the |
2357 | +# License, or (at your option) any later version. |
2358 | +# |
2359 | +# This program is distributed in the hope that it will be useful, |
2360 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2361 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2362 | +# GNU Affero General Public License for more details. |
2363 | +# |
2364 | +# You should have received a copy of the GNU Affero General Public License |
2365 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2366 | +# |
2367 | +############################################################################## |
2368 | + |
2369 | +from . import company |
2370 | +from . import wizard |
2371 | +from . import account_banking_sdd |
2372 | |
2373 | === added file 'account_banking_sepa_direct_debit/__openerp__.py' |
2374 | --- account_banking_sepa_direct_debit/__openerp__.py 1970-01-01 00:00:00 +0000 |
2375 | +++ account_banking_sepa_direct_debit/__openerp__.py 2014-01-13 12:42:46 +0000 |
2376 | @@ -0,0 +1,60 @@ |
2377 | +############################################################################## |
2378 | +# |
2379 | +# SEPA Direct Debit module for OpenERP |
2380 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
2381 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
2382 | +# |
2383 | +# This program is free software: you can redistribute it and/or modify |
2384 | +# it under the terms of the GNU Affero General Public License as |
2385 | +# published by the Free Software Foundation, either version 3 of the |
2386 | +# License, or (at your option) any later version. |
2387 | +# |
2388 | +# This program is distributed in the hope that it will be useful, |
2389 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2390 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2391 | +# GNU Affero General Public License for more details. |
2392 | +# |
2393 | +# You should have received a copy of the GNU Affero General Public License |
2394 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2395 | +# |
2396 | +############################################################################## |
2397 | +{ |
2398 | + 'name': 'Account Banking SEPA Direct Debit', |
2399 | + 'summary': 'Create SEPA files for Direct Debit', |
2400 | + 'version': '0.1', |
2401 | + 'license': 'AGPL-3', |
2402 | + 'author': 'Akretion', |
2403 | + 'website': 'http://www.akretion.com', |
2404 | + 'category': 'Banking addons', |
2405 | + 'depends': ['account_direct_debit', 'account_banking_pain_base'], |
2406 | + 'external_dependencies': { |
2407 | + 'python': ['unidecode', 'lxml'], |
2408 | + }, |
2409 | + 'data': [ |
2410 | + 'security/original_mandate_required_security.xml', |
2411 | + 'account_banking_sdd_view.xml', |
2412 | + 'sdd_mandate_view.xml', |
2413 | + 'res_partner_bank_view.xml', |
2414 | + 'account_payment_view.xml', |
2415 | + 'company_view.xml', |
2416 | + 'mandate_expire_cron.xml', |
2417 | + 'account_invoice_view.xml', |
2418 | + 'wizard/export_sdd_view.xml', |
2419 | + 'data/payment_type_sdd.xml', |
2420 | + 'data/mandate_reference_sequence.xml', |
2421 | + 'security/ir.model.access.csv', |
2422 | + ], |
2423 | + 'description': ''' |
2424 | +Module to export direct debit payment orders in SEPA XML file format. |
2425 | + |
2426 | +SEPA PAIN (PAyment INitiation) is the new european standard for Customer-to-Bank payment instructions. This module implements SEPA Direct Debit (SDD), more specifically PAIN versions 008.001.02, 008.001.03 and 008.001.04. It is part of the ISO 20022 standard, available on http://www.iso20022.org. |
2427 | + |
2428 | +The Implementation Guidelines for SEPA Direct Debit published by the European Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN version 008.001.02. So if you don't know which version your bank supports, you should try version 008.001.02 first. |
2429 | + |
2430 | +This module uses the framework provided by the banking addons, cf https://launchpad.net/banking-addons |
2431 | + |
2432 | +Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module. |
2433 | + ''', |
2434 | + 'active': False, |
2435 | + 'installable': True, |
2436 | +} |
2437 | |
2438 | === added file 'account_banking_sepa_direct_debit/account_banking_sdd.py' |
2439 | --- account_banking_sepa_direct_debit/account_banking_sdd.py 1970-01-01 00:00:00 +0000 |
2440 | +++ account_banking_sepa_direct_debit/account_banking_sdd.py 2014-01-13 12:42:46 +0000 |
2441 | @@ -0,0 +1,424 @@ |
2442 | +############################################################################## |
2443 | +# |
2444 | +# SEPA Direct Debit module for OpenERP |
2445 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
2446 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
2447 | +# |
2448 | +# This program is free software: you can redistribute it and/or modify |
2449 | +# it under the terms of the GNU Affero General Public License as |
2450 | +# published by the Free Software Foundation, either version 3 of the |
2451 | +# License, or (at your option) any later version. |
2452 | +# |
2453 | +# This program is distributed in the hope that it will be useful, |
2454 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2455 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2456 | +# GNU Affero General Public License for more details. |
2457 | +# |
2458 | +# You should have received a copy of the GNU Affero General Public License |
2459 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2460 | +# |
2461 | +############################################################################## |
2462 | + |
2463 | +from openerp.osv import orm, fields |
2464 | +from openerp.tools.translate import _ |
2465 | +from openerp.addons.decimal_precision import decimal_precision as dp |
2466 | +from unidecode import unidecode |
2467 | +from datetime import datetime |
2468 | +from dateutil.relativedelta import relativedelta |
2469 | +import logging |
2470 | + |
2471 | +NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY = 36 |
2472 | + |
2473 | +logger = logging.getLogger(__name__) |
2474 | + |
2475 | + |
2476 | +class banking_export_sdd(orm.Model): |
2477 | + '''SEPA Direct Debit export''' |
2478 | + _name = 'banking.export.sdd' |
2479 | + _description = __doc__ |
2480 | + _rec_name = 'filename' |
2481 | + |
2482 | + def _generate_filename(self, cr, uid, ids, name, arg, context=None): |
2483 | + res = {} |
2484 | + for sepa_file in self.browse(cr, uid, ids, context=context): |
2485 | + ref = sepa_file.payment_order_ids[0].reference |
2486 | + if ref: |
2487 | + label = unidecode(ref.replace('/', '-')) |
2488 | + else: |
2489 | + label = 'error' |
2490 | + res[sepa_file.id] = 'sdd_%s.xml' % label |
2491 | + return res |
2492 | + |
2493 | + _columns = { |
2494 | + 'payment_order_ids': fields.many2many( |
2495 | + 'payment.order', |
2496 | + 'account_payment_order_sdd_rel', |
2497 | + 'banking_export_sepa_id', 'account_order_id', |
2498 | + 'Payment Orders', |
2499 | + readonly=True), |
2500 | + 'nb_transactions': fields.integer( |
2501 | + 'Number of Transactions', readonly=True), |
2502 | + 'total_amount': fields.float( |
2503 | + 'Total Amount', digits_compute=dp.get_precision('Account'), |
2504 | + readonly=True), |
2505 | + 'batch_booking': fields.boolean( |
2506 | + 'Batch Booking', readonly=True, |
2507 | + help="If true, the bank statement will display only one credit " |
2508 | + "line for all the direct debits of the SEPA file ; if false, " |
2509 | + "the bank statement will display one credit line per direct " |
2510 | + "debit of the SEPA file."), |
2511 | + 'charge_bearer': fields.selection([ |
2512 | + ('SLEV', 'Following Service Level'), |
2513 | + ('SHAR', 'Shared'), |
2514 | + ('CRED', 'Borne by Creditor'), |
2515 | + ('DEBT', 'Borne by Debtor'), |
2516 | + ], 'Charge Bearer', readonly=True, |
2517 | + help="Following service level : transaction charges are to be " |
2518 | + "applied following the rules agreed in the service level and/or " |
2519 | + "scheme (SEPA Core messages must use this). Shared : " |
2520 | + "transaction charges on the creditor side are to be borne by " |
2521 | + "the creditor, transaction charges on the debtor side are to be " |
2522 | + "borne by the debtor. Borne by creditor : all transaction " |
2523 | + "charges are to be borne by the creditor. Borne by debtor : " |
2524 | + "all transaction charges are to be borne by the debtor."), |
2525 | + 'create_date': fields.datetime('Generation Date', readonly=True), |
2526 | + 'file': fields.binary('SEPA File', readonly=True), |
2527 | + 'filename': fields.function( |
2528 | + _generate_filename, type='char', size=256, |
2529 | + string='Filename', readonly=True, store=True), |
2530 | + 'state': fields.selection([ |
2531 | + ('draft', 'Draft'), |
2532 | + ('sent', 'Sent'), |
2533 | + ('done', 'Reconciled'), |
2534 | + ], 'State', readonly=True), |
2535 | + } |
2536 | + |
2537 | + _defaults = { |
2538 | + 'state': 'draft', |
2539 | + } |
2540 | + |
2541 | + |
2542 | +class sdd_mandate(orm.Model): |
2543 | + '''SEPA Direct Debit Mandate''' |
2544 | + _name = 'sdd.mandate' |
2545 | + _description = __doc__ |
2546 | + _rec_name = 'unique_mandate_reference' |
2547 | + _inherit = ['mail.thread'] |
2548 | + _order = 'signature_date desc' |
2549 | + _track = { |
2550 | + 'state': { |
2551 | + 'account_banking_sepa_direct_debit.mandate_valid': |
2552 | + lambda self, cr, uid, obj, ctx=None: |
2553 | + obj['state'] == 'valid', |
2554 | + 'account_banking_sepa_direct_debit.mandate_expired': |
2555 | + lambda self, cr, uid, obj, ctx=None: |
2556 | + obj['state'] == 'expired', |
2557 | + 'account_banking_sepa_direct_debit.mandate_cancel': |
2558 | + lambda self, cr, uid, obj, ctx=None: |
2559 | + obj['state'] == 'cancel', |
2560 | + }, |
2561 | + 'recurrent_sequence_type': { |
2562 | + 'account_banking_sepa_direct_debit.recurrent_sequence_type_first': |
2563 | + lambda self, cr, uid, obj, ctx=None: |
2564 | + obj['recurrent_sequence_type'] == 'first', |
2565 | + 'account_banking_sepa_direct_debit.' |
2566 | + 'recurrent_sequence_type_recurring': |
2567 | + lambda self, cr, uid, obj, ctx=None: |
2568 | + obj['recurrent_sequence_type'] == 'recurring', |
2569 | + 'account_banking_sepa_direct_debit.recurrent_sequence_type_final': |
2570 | + lambda self, cr, uid, obj, ctx=None: |
2571 | + obj['recurrent_sequence_type'] == 'final', |
2572 | + } |
2573 | + } |
2574 | + |
2575 | + _columns = { |
2576 | + 'partner_bank_id': fields.many2one( |
2577 | + 'res.partner.bank', 'Bank Account', track_visibility='onchange'), |
2578 | + 'partner_id': fields.related( |
2579 | + 'partner_bank_id', 'partner_id', type='many2one', |
2580 | + relation='res.partner', string='Partner', readonly=True), |
2581 | + 'company_id': fields.many2one('res.company', 'Company', required=True), |
2582 | + 'unique_mandate_reference': fields.char( |
2583 | + 'Unique Mandate Reference', size=35, readonly=True, |
2584 | + track_visibility='always'), |
2585 | + 'type': fields.selection([ |
2586 | + ('recurrent', 'Recurrent'), |
2587 | + ('oneoff', 'One-Off'), |
2588 | + ], 'Type of Mandate', required=True, track_visibility='always'), |
2589 | + 'recurrent_sequence_type': fields.selection([ |
2590 | + ('first', 'First'), |
2591 | + ('recurring', 'Recurring'), |
2592 | + ('final', 'Final'), |
2593 | + ], 'Sequence Type for Next Debit', track_visibility='onchange', |
2594 | + help="This field is only used for Recurrent mandates, not for " |
2595 | + "One-Off mandates."), |
2596 | + 'signature_date': fields.date( |
2597 | + 'Date of Signature of the Mandate', track_visibility='onchange'), |
2598 | + 'scan': fields.binary('Scan of the Mandate'), |
2599 | + 'last_debit_date': fields.date( |
2600 | + 'Date of the Last Debit', readonly=True), |
2601 | + 'state': fields.selection([ |
2602 | + ('draft', 'Draft'), |
2603 | + ('valid', 'Valid'), |
2604 | + ('expired', 'Expired'), |
2605 | + ('cancel', 'Cancelled'), |
2606 | + ], 'Status', |
2607 | + help="Only valid mandates can be used in a payment line. A " |
2608 | + "cancelled mandate is a mandate that has been cancelled by " |
2609 | + "the customer. A one-off mandate expires after its first use. " |
2610 | + "A recurrent mandate expires after it's final use or if it " |
2611 | + "hasn't been used for 36 months."), |
2612 | + 'payment_line_ids': fields.one2many( |
2613 | + 'payment.line', 'sdd_mandate_id', "Related Payment Lines"), |
2614 | + 'sepa_migrated': fields.boolean( |
2615 | + 'Migrated to SEPA', track_visibility='onchange', |
2616 | + help="If this field is not active, the mandate section of the " |
2617 | + "next direct debit file that include this mandate will contain " |
2618 | + "the 'Original Mandate Identification' and the 'Original " |
2619 | + "Creditor Scheme Identification'. This is required in a few " |
2620 | + "countries (Belgium for instance), but not in all countries. " |
2621 | + "If this is not required in your country, you should keep this " |
2622 | + "field always active."), |
2623 | + 'original_mandate_identification': fields.char( |
2624 | + 'Original Mandate Identification', size=35, |
2625 | + track_visibility='onchange', |
2626 | + help="When the field 'Migrated to SEPA' is not active, this " |
2627 | + "field will be used as the Original Mandate Identification in " |
2628 | + "the Direct Debit file."), |
2629 | + } |
2630 | + |
2631 | + _defaults = { |
2632 | + 'company_id': lambda self, cr, uid, context: |
2633 | + self.pool['res.company']._company_default_get( |
2634 | + cr, uid, 'sdd.mandate', context=context), |
2635 | + 'unique_mandate_reference': lambda self, cr, uid, ctx: |
2636 | + self.pool['ir.sequence'].get(cr, uid, 'sdd.mandate.reference'), |
2637 | + 'state': 'draft', |
2638 | + 'sepa_migrated': True, |
2639 | + } |
2640 | + |
2641 | + _sql_constraints = [( |
2642 | + 'mandate_ref_company_uniq', |
2643 | + 'unique(unique_mandate_reference, company_id)', |
2644 | + 'A Mandate with the same reference already exists for this company !' |
2645 | + )] |
2646 | + |
2647 | + def _check_sdd_mandate(self, cr, uid, ids): |
2648 | + for mandate in self.browse(cr, uid, ids): |
2649 | + if (mandate.signature_date and |
2650 | + mandate.signature_date > |
2651 | + datetime.today().strftime('%Y-%m-%d')): |
2652 | + raise orm.except_orm( |
2653 | + _('Error:'), |
2654 | + _("The date of signature of mandate '%s' is in the " |
2655 | + "future !") |
2656 | + % mandate.unique_mandate_reference) |
2657 | + if mandate.state == 'valid' and not mandate.signature_date: |
2658 | + raise orm.except_orm( |
2659 | + _('Error:'), |
2660 | + _("Cannot validate the mandate '%s' without a date of " |
2661 | + "signature.") |
2662 | + % mandate.unique_mandate_reference) |
2663 | + if mandate.state == 'valid' and not mandate.partner_bank_id: |
2664 | + raise orm.except_orm( |
2665 | + _('Error:'), |
2666 | + _("Cannot validate the mandate '%s' because it is not " |
2667 | + "attached to a bank account.") |
2668 | + % mandate.unique_mandate_reference) |
2669 | + |
2670 | + if (mandate.signature_date and mandate.last_debit_date and |
2671 | + mandate.signature_date > mandate.last_debit_date): |
2672 | + raise orm.except_orm( |
2673 | + _('Error:'), |
2674 | + _("The mandate '%s' can't have a date of last debit " |
2675 | + "before the date of signature.") |
2676 | + % mandate.unique_mandate_reference) |
2677 | + if (mandate.type == 'recurrent' |
2678 | + and not mandate.recurrent_sequence_type): |
2679 | + raise orm.except_orm( |
2680 | + _('Error:'), |
2681 | + _("The recurrent mandate '%s' must have a sequence type.") |
2682 | + % mandate.unique_mandate_reference) |
2683 | + if (mandate.type == 'recurrent' and not mandate.sepa_migrated |
2684 | + and mandate.recurrent_sequence_type != 'first'): |
2685 | + raise orm.except_orm( |
2686 | + _('Error:'), |
2687 | + _("The recurrent mandate '%s' which is not marked as " |
2688 | + "'Migrated to SEPA' must have its recurrent sequence " |
2689 | + "type set to 'First'.") |
2690 | + % mandate.unique_mandate_reference) |
2691 | + if (mandate.type == 'recurrent' and not mandate.sepa_migrated |
2692 | + and not mandate.original_mandate_identification): |
2693 | + raise orm.except_orm( |
2694 | + _('Error:'), |
2695 | + _("You must set the 'Original Mandate Identification' " |
2696 | + "on the recurrent mandate '%s' which is not marked " |
2697 | + "as 'Migrated to SEPA'.") |
2698 | + % mandate.unique_mandate_reference) |
2699 | + return True |
2700 | + |
2701 | + _constraints = [ |
2702 | + (_check_sdd_mandate, "Error msg in raise", [ |
2703 | + 'last_debit_date', 'signature_date', 'state', 'partner_bank_id', |
2704 | + 'type', 'recurrent_sequence_type', 'sepa_migrated', |
2705 | + 'original_mandate_identification', |
2706 | + ]), |
2707 | + ] |
2708 | + |
2709 | + def mandate_type_change(self, cr, uid, ids, type): |
2710 | + if type == 'recurrent': |
2711 | + recurrent_sequence_type = 'first' |
2712 | + else: |
2713 | + recurrent_sequence_type = False |
2714 | + res = {'value': {'recurrent_sequence_type': recurrent_sequence_type}} |
2715 | + return res |
2716 | + |
2717 | + def mandate_partner_bank_change( |
2718 | + self, cr, uid, ids, partner_bank_id, type, recurrent_sequence_type, |
2719 | + last_debit_date, state): |
2720 | + res = {'value': {}} |
2721 | + if partner_bank_id: |
2722 | + partner_bank_read = self.pool['res.partner.bank'].read( |
2723 | + cr, uid, partner_bank_id, ['partner_id'])['partner_id'] |
2724 | + if partner_bank_read: |
2725 | + res['value']['partner_id'] = partner_bank_read[0] |
2726 | + if (state == 'valid' and partner_bank_id |
2727 | + and type == 'recurrent' |
2728 | + and recurrent_sequence_type != 'first'): |
2729 | + res['value']['recurrent_sequence_type'] = 'first' |
2730 | + res['warning'] = { |
2731 | + 'title': _('Mandate update'), |
2732 | + 'message': _( |
2733 | + "As you changed the bank account attached to this " |
2734 | + "mandate, the 'Sequence Type' has been set back to " |
2735 | + "'First'."), |
2736 | + } |
2737 | + return res |
2738 | + |
2739 | + def validate(self, cr, uid, ids, context=None): |
2740 | + to_validate_ids = [] |
2741 | + for mandate in self.browse(cr, uid, ids, context=context): |
2742 | + assert mandate.state == 'draft', 'Mandate should be in draft state' |
2743 | + to_validate_ids.append(mandate.id) |
2744 | + self.write( |
2745 | + cr, uid, to_validate_ids, {'state': 'valid'}, context=context) |
2746 | + return True |
2747 | + |
2748 | + def cancel(self, cr, uid, ids, context=None): |
2749 | + to_cancel_ids = [] |
2750 | + for mandate in self.browse(cr, uid, ids, context=context): |
2751 | + assert mandate.state in ('draft', 'valid'),\ |
2752 | + 'Mandate should be in draft or valid state' |
2753 | + to_cancel_ids.append(mandate.id) |
2754 | + self.write( |
2755 | + cr, uid, to_cancel_ids, {'state': 'cancel'}, context=context) |
2756 | + return True |
2757 | + |
2758 | + def _sdd_mandate_set_state_to_expired(self, cr, uid, context=None): |
2759 | + logger.info('Searching for SDD Mandates that must be set to Expired') |
2760 | + expire_limit_date = datetime.today() + \ |
2761 | + relativedelta(months=-NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY) |
2762 | + expire_limit_date_str = expire_limit_date.strftime('%Y-%m-%d') |
2763 | + expired_mandate_ids = self.search(cr, uid, [ |
2764 | + '|', |
2765 | + ('last_debit_date', '=', False), |
2766 | + ('last_debit_date', '<=', expire_limit_date_str), |
2767 | + ('state', '=', 'valid'), |
2768 | + ('signature_date', '<=', expire_limit_date_str), |
2769 | + ], context=context) |
2770 | + if expired_mandate_ids: |
2771 | + self.write( |
2772 | + cr, uid, expired_mandate_ids, {'state': 'expired'}, |
2773 | + context=context) |
2774 | + logger.info( |
2775 | + 'The following SDD Mandate IDs has been set to expired: %s' |
2776 | + % expired_mandate_ids) |
2777 | + else: |
2778 | + logger.info('0 SDD Mandates must be set to Expired') |
2779 | + return True |
2780 | + |
2781 | + |
2782 | +class res_partner_bank(orm.Model): |
2783 | + _inherit = 'res.partner.bank' |
2784 | + |
2785 | + _columns = { |
2786 | + 'sdd_mandate_ids': fields.one2many( |
2787 | + 'sdd.mandate', 'partner_bank_id', 'SEPA Direct Debit Mandates'), |
2788 | + } |
2789 | + |
2790 | + |
2791 | +class payment_line(orm.Model): |
2792 | + _inherit = 'payment.line' |
2793 | + |
2794 | + _columns = { |
2795 | + 'sdd_mandate_id': fields.many2one( |
2796 | + 'sdd.mandate', 'SEPA Direct Debit Mandate', |
2797 | + domain=[('state', '=', 'valid')]), |
2798 | + } |
2799 | + |
2800 | + def create(self, cr, uid, vals, context=None): |
2801 | + '''If the customer invoice has a mandate, take it |
2802 | + otherwise, take the first valid mandate of the bank account''' |
2803 | + if context is None: |
2804 | + context = {} |
2805 | + if not vals: |
2806 | + vals = {} |
2807 | + partner_bank_id = vals.get('bank_id') |
2808 | + move_line_id = vals.get('move_line_id') |
2809 | + if (context.get('default_payment_order_type') == 'debit' |
2810 | + and 'sdd_mandate_id' not in vals): |
2811 | + if move_line_id: |
2812 | + line = self.pool['account.move.line'].browse( |
2813 | + cr, uid, move_line_id, context=context) |
2814 | + if (line.invoice and line.invoice.type == 'out_invoice' |
2815 | + and line.invoice.sdd_mandate_id): |
2816 | + vals.update({ |
2817 | + 'sdd_mandate_id': line.invoice.sdd_mandate_id.id, |
2818 | + 'bank_id': |
2819 | + line.invoice.sdd_mandate_id.partner_bank_id.id, |
2820 | + }) |
2821 | + if partner_bank_id and 'sdd_mandate_id' not in vals: |
2822 | + mandate_ids = self.pool['sdd.mandate'].search(cr, uid, [ |
2823 | + ('partner_bank_id', '=', partner_bank_id), |
2824 | + ('state', '=', 'valid'), |
2825 | + ], context=context) |
2826 | + if mandate_ids: |
2827 | + vals['sdd_mandate_id'] = mandate_ids[0] |
2828 | + return super(payment_line, self).create(cr, uid, vals, context=context) |
2829 | + |
2830 | + def _check_mandate_bank_link(self, cr, uid, ids): |
2831 | + for payline in self.browse(cr, uid, ids): |
2832 | + if (payline.sdd_mandate_id and payline.bank_id |
2833 | + and payline.sdd_mandate_id.partner_bank_id.id != |
2834 | + payline.bank_id.id): |
2835 | + raise orm.except_orm( |
2836 | + _('Error:'), |
2837 | + _("The payment line with reference '%s' has the bank " |
2838 | + "account '%s' which is not attached to the mandate " |
2839 | + "'%s' (this mandate is attached to the bank account " |
2840 | + "'%s').") % ( |
2841 | + payline.name, |
2842 | + self.pool['res.partner.bank'].name_get( |
2843 | + cr, uid, [payline.bank_id.id])[0][1], |
2844 | + payline.sdd_mandate_id.unique_mandate_reference, |
2845 | + self.pool['res.partner.bank'].name_get( |
2846 | + cr, uid, |
2847 | + [payline.sdd_mandate_id.partner_bank_id.id])[0][1], |
2848 | + )) |
2849 | + return True |
2850 | + |
2851 | + _constraints = [ |
2852 | + (_check_mandate_bank_link, 'Error msg in raise', |
2853 | + ['sdd_mandate_id', 'bank_id']), |
2854 | + ] |
2855 | + |
2856 | + |
2857 | +class account_invoice(orm.Model): |
2858 | + _inherit = 'account.invoice' |
2859 | + |
2860 | + _columns = { |
2861 | + 'sdd_mandate_id': fields.many2one( |
2862 | + 'sdd.mandate', 'SEPA Direct Debit Mandate', |
2863 | + domain=[('state', '=', 'valid')], readonly=True, |
2864 | + states={'draft': [('readonly', False)]}) |
2865 | + } |
2866 | |
2867 | === added file 'account_banking_sepa_direct_debit/account_banking_sdd_view.xml' |
2868 | --- account_banking_sepa_direct_debit/account_banking_sdd_view.xml 1970-01-01 00:00:00 +0000 |
2869 | +++ account_banking_sepa_direct_debit/account_banking_sdd_view.xml 2014-01-13 12:42:46 +0000 |
2870 | @@ -0,0 +1,80 @@ |
2871 | +<?xml version="1.0" encoding="utf-8"?> |
2872 | +<!-- |
2873 | + Copyright (C) 2013 Akretion (http://www.akretion.com) |
2874 | + @author: Alexis de Lattre <alexis.delattre@akretion.com> |
2875 | + The licence is in the file __openerp__.py |
2876 | +--> |
2877 | +<openerp> |
2878 | +<data> |
2879 | + |
2880 | +<record id="view_banking_export_sdd_form" model="ir.ui.view"> |
2881 | + <field name="name">account.banking.export.sdd.form</field> |
2882 | + <field name="model">banking.export.sdd</field> |
2883 | + <field name="arch" type="xml"> |
2884 | + <form string="SEPA Direct Debit"> |
2885 | + <notebook> |
2886 | + <page string="General Information"> |
2887 | + <field name="total_amount" /> |
2888 | + <field name="nb_transactions" /> |
2889 | + <field name="batch_booking" /> |
2890 | + <field name="charge_bearer"/> |
2891 | + <field name="create_date" /> |
2892 | + <newline /> |
2893 | + <field name="file" filename="filename"/> |
2894 | + <field name="filename" invisible="True"/> |
2895 | + </page> |
2896 | + <page string="Payment Orders"> |
2897 | + <field name="payment_order_ids" colspan="4" nolabel="1"> |
2898 | + <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment Orders"> |
2899 | + <field name="reference"/> |
2900 | + <field name="date_created"/> |
2901 | + <field name="date_done"/> |
2902 | + <field name="total"/> |
2903 | + <field name="state"/> |
2904 | + </tree> |
2905 | + </field> |
2906 | + </page> |
2907 | + </notebook> |
2908 | + </form> |
2909 | + </field> |
2910 | +</record> |
2911 | + |
2912 | + |
2913 | +<record id="view_banking_export_sdd_tree" model="ir.ui.view"> |
2914 | + <field name="name">account.banking.export.sdd.tree</field> |
2915 | + <field name="model">banking.export.sdd</field> |
2916 | + <field name="arch" type="xml"> |
2917 | + <tree string="SEPA Direct Debit"> |
2918 | + <field name="filename"/> |
2919 | + <field name="create_date"/> |
2920 | + <field name="nb_transactions"/> |
2921 | + </tree> |
2922 | + </field> |
2923 | +</record> |
2924 | + |
2925 | + |
2926 | +<record id="action_account_banking_sdd" model="ir.actions.act_window"> |
2927 | + <field name="name">SEPA Direct Debit Files</field> |
2928 | + <field name="res_model">banking.export.sdd</field> |
2929 | + <field name="view_type">form</field> |
2930 | + <field name="view_mode">tree,form</field> |
2931 | +</record> |
2932 | + |
2933 | + |
2934 | +<menuitem id="menu_account_banking_sdd" |
2935 | + parent="account_payment.menu_main_payment" |
2936 | + action="action_account_banking_sdd" |
2937 | + sequence="20" |
2938 | + /> |
2939 | + |
2940 | +<act_window id="act_banking_export_sdd_payment_order" |
2941 | + name="Generated SEPA Direct Debit Files" |
2942 | + domain="[('payment_order_ids', '=', active_id)]" |
2943 | + res_model="banking.export.sdd" |
2944 | + src_model="payment.order" |
2945 | + view_type="form" |
2946 | + view_mode="tree,form" |
2947 | +/> |
2948 | + |
2949 | +</data> |
2950 | +</openerp> |
2951 | |
2952 | === added file 'account_banking_sepa_direct_debit/account_invoice_view.xml' |
2953 | --- account_banking_sepa_direct_debit/account_invoice_view.xml 1970-01-01 00:00:00 +0000 |
2954 | +++ account_banking_sepa_direct_debit/account_invoice_view.xml 2014-01-13 12:42:46 +0000 |
2955 | @@ -0,0 +1,22 @@ |
2956 | +<?xml version="1.0" encoding="utf-8"?> |
2957 | +<!-- |
2958 | + Copyright (C) 2013 Akretion (http://www.akretion.com) |
2959 | + @author: Alexis de Lattre <alexis.delattre@akretion.com> |
2960 | + The licence is in the file __openerp__.py |
2961 | +--> |
2962 | +<openerp> |
2963 | +<data> |
2964 | + |
2965 | +<record id="invoice_form" model="ir.ui.view"> |
2966 | + <field name="name">add.sdd.mandate.on.customer.invoice.form</field> |
2967 | + <field name="model">account.invoice</field> |
2968 | + <field name="inherit_id" ref="account.invoice_form"/> |
2969 | + <field name="arch" type="xml"> |
2970 | + <field name="partner_bank_id" position="after"> |
2971 | + <field name="sdd_mandate_id" domain="[('partner_id', '=', partner_id), ('state', '=', 'valid')]" attrs="{'invisible': [('type', '=', 'out_refund')]}"/> |
2972 | + </field> |
2973 | + </field> |
2974 | +</record> |
2975 | + |
2976 | +</data> |
2977 | +</openerp> |
2978 | |
2979 | === added file 'account_banking_sepa_direct_debit/account_payment_view.xml' |
2980 | --- account_banking_sepa_direct_debit/account_payment_view.xml 1970-01-01 00:00:00 +0000 |
2981 | +++ account_banking_sepa_direct_debit/account_payment_view.xml 2014-01-13 12:42:46 +0000 |
2982 | @@ -0,0 +1,26 @@ |
2983 | +<?xml version="1.0" encoding="utf-8"?> |
2984 | +<!-- |
2985 | + Copyright (C) 2013 Akretion (http://www.akretion.com) |
2986 | + @author: Alexis de Lattre <alexis.delattre@akretion.com> |
2987 | + The licence is in the file __openerp__.py |
2988 | +--> |
2989 | +<openerp> |
2990 | +<data> |
2991 | + |
2992 | +<record id="sdd_view_payment_order_form" model="ir.ui.view"> |
2993 | + <field name="name">sdd.payment.order.form</field> |
2994 | + <field name="model">payment.order</field> |
2995 | + <field name="inherit_id" ref="account_payment.view_payment_order_form"/> |
2996 | + <field name="arch" type="xml"> |
2997 | + <xpath expr="//field[@name='line_ids']/form/notebook/page/group/field[@name='bank_id']" position="after"> |
2998 | + <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}"/> |
2999 | + <newline /> |
3000 | + </xpath> |
3001 | + <xpath expr="//field[@name='line_ids']/tree/field[@name='bank_id']" position="after"> |
3002 | + <field name="sdd_mandate_id" string="SDD Mandate" invisible="context.get('default_payment_order_type')!='debit'"/> |
3003 | + </xpath> |
3004 | + </field> |
3005 | +</record> |
3006 | + |
3007 | +</data> |
3008 | +</openerp> |
3009 | |
3010 | === added file 'account_banking_sepa_direct_debit/company.py' |
3011 | --- account_banking_sepa_direct_debit/company.py 1970-01-01 00:00:00 +0000 |
3012 | +++ account_banking_sepa_direct_debit/company.py 2014-01-13 12:42:46 +0000 |
3013 | @@ -0,0 +1,89 @@ |
3014 | +############################################################################## |
3015 | +# |
3016 | +# SEPA Direct Debit module for OpenERP |
3017 | +# Copyright (C) 2013 Akretion (http://www.akretion.com) |
3018 | +# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
3019 | +# |
3020 | +# This program is free software: you can redistribute it and/or modify |
3021 | +# it under the terms of the GNU Affero General Public License as |
3022 | +# published by the Free Software Foundation, either version 3 of the |
3023 | +# License, or (at your option) any later version. |
3024 | +# |
3025 | +# This program is distributed in the hope that it will be useful, |
3026 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3027 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3028 | +# GNU Affero General Public License for more details. |
3029 | +# |
3030 | +# You should have received a copy of the GNU Affero General Public License |
3031 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
3032 | +# |
3033 | +############################################################################## |
3034 | + |
3035 | +from openerp.osv import orm, fields |
3036 | +import logging |
3037 | + |
3038 | +logger = logging.getLogger(__name__) |
3039 | + |
3040 | + |
3041 | +class res_company(orm.Model): |
3042 | + _inherit = 'res.company' |
3043 | + |
3044 | + _columns = { |
3045 | + 'sepa_creditor_identifier': fields.char( |
3046 | + 'SEPA Creditor Identifier', size=35, |
3047 | + help="Enter the Creditor Identifier that has been attributed " |
3048 | + "to your company to make SEPA Direct Debits. This identifier " |
3049 | + "is composed of :\n- your country ISO code (2 letters)\n- a " |
3050 | + "2-digits checkum\n- a 3-letters business code\n- a " |
3051 | + "country-specific identifier"), |
3052 | + 'original_creditor_identifier': fields.char( |
3053 | + 'Original Creditor Identifier', size=70), |
3054 | + } |
3055 | + |
3056 | + def is_sepa_creditor_identifier_valid( |
3057 | + self, cr, uid, sepa_creditor_identifier, context=None): |
3058 | + """Check if SEPA Creditor Identifier is valid |
3059 | + @param sepa_creditor_identifier: SEPA Creditor Identifier as str |
3060 | + or unicode |
3061 | + @return: True if valid, False otherwise |
3062 | + """ |
3063 | + if not isinstance(sepa_creditor_identifier, (str, unicode)): |
3064 | + return False |
3065 | + try: |
3066 | + sci_str = str(sepa_creditor_identifier) |
3067 | + except: |
3068 | + logger.warning( |
3069 | + "SEPA Creditor ID should contain only ASCII caracters.") |
3070 | + return False |
3071 | + sci = sci_str.lower() |
3072 | + if len(sci) < 9: |
3073 | + return False |
3074 | + before_replacement = sci[7:] + sci[0:2] + '00' |
3075 | + logger.debug( |
3076 | + "SEPA ID check before_replacement = %s" % before_replacement) |
3077 | + after_replacement = '' |
3078 | + for char in before_replacement: |
3079 | + if char.isalpha(): |
3080 | + after_replacement += str(ord(char)-87) |
3081 | + else: |
3082 | + after_replacement += char |
3083 | + logger.debug( |
3084 | + "SEPA ID check after_replacement = %s" % after_replacement) |
3085 | + if int(sci[2:4]) == (98 - (int(after_replacement) % 97)): |
3086 | + return True |
3087 | + else: |
3088 | + return False |
3089 | + |
3090 | + def _check_sepa_creditor_identifier(self, cr, uid, ids): |
3091 | + for company in self.browse(cr, uid, ids): |
3092 | + if company.sepa_creditor_identifier: |
3093 | + if not self.is_sepa_creditor_identifier_valid( |
3094 | + cr, uid, company.sepa_creditor_identifier): |
3095 | + return False |
3096 | + return True |
3097 | + |
3098 | + _constraints = [ |
3099 | + (_check_sepa_creditor_identifier, |
3100 | + "Invalid SEPA Creditor Identifier.", |
3101 | + ['sepa_creditor_identifier']), |
3102 | + ] |
3103 | |
3104 | === added file 'account_banking_sepa_direct_debit/company_view.xml' |
3105 | --- account_banking_sepa_direct_debit/company_view.xml 1970-01-01 00:00:00 +0000 |
3106 | +++ account_banking_sepa_direct_debit/company_view.xml 2014-01-13 12:42:46 +0000 |
3107 | @@ -0,0 +1,23 @@ |
3108 | +<?xml version="1.0" encoding="utf-8"?> |
3109 | +<!-- |
3110 | + Copyright (C) 2013 Akretion (http://www.akretion.com) |
3111 | + @author: Alexis de Lattre <alexis.delattre@akretion.com> |
3112 | + The licence is in the file __openerp__.py |
3113 | +--> |
3114 | +<openerp> |
3115 | +<data> |
3116 | + |
3117 | +<record id="sdd_res_company_form" model="ir.ui.view"> |
3118 | + <field name="name">sepa_direct_debit.res.company.form</field> |
3119 | + <field name="model">res.company</field> |
3120 | + <field name="inherit_id" ref="account_banking_pain_base.view_company_form"/> |
3121 | + <field name="arch" type="xml"> |
3122 | + <group name="pain" position="inside"> |
3123 | + <field name="sepa_creditor_identifier"/> |
3124 | + <field name="original_creditor_identifier" groups="account_banking_sepa_direct_debit.group_original_mandate_required"/> |
3125 | + </group> |
3126 | + </field> |
3127 | +</record> |
3128 | + |
3129 | +</data> |
3130 | +</openerp> |
3131 | |
3132 | === added directory 'account_banking_sepa_direct_debit/data' |
3133 | === added file 'account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml' |
3134 | --- account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml 1970-01-01 00:00:00 +0000 |
3135 | +++ account_banking_sepa_direct_debit/data/mandate_reference_sequence.xml 2014-01-13 12:42:46 +0000 |
3136 | @@ -0,0 +1,21 @@ |
3137 | +<?xml version="1.0" encoding="utf-8"?> |
3138 | +<openerp> |
3139 | +<data noupdate="1"> |
3140 | + |
3141 | + |
3142 | +<record id="sdd_mandate_seq_type" model="ir.sequence.type"> |
3143 | + <field name="name">SDD Mandate Reference</field> |
3144 | + <field name="code">sdd.mandate.reference</field> |
3145 | +</record> |
3146 | + |
3147 | +<record id="sdd_mandate_seq" model="ir.sequence"> |
3148 | + <field name="name">SDD Mandate Reference</field> |
3149 | + <field name="code">sdd.mandate.reference</field> |
3150 | + <field name="prefix">RUM</field> |
3151 | + <field name="padding" eval="7"/> |
3152 | + <!-- remember that max size for the mandate ref is 35 --> |
3153 | +</record> |
3154 | + |
3155 | + |
3156 | +</data> |
3157 | +</openerp> |
3158 | |
3159 | === added file 'account_banking_sepa_direct_debit/data/pain.008.001.02.xsd' |
3160 | --- account_banking_sepa_direct_debit/data/pain.008.001.02.xsd 1970-01-01 00:00:00 +0000 |
3161 | +++ account_banking_sepa_direct_debit/data/pain.008.001.02.xsd 2014-01-13 12:42:46 +0000 |
3162 | @@ -0,0 +1,879 @@ |
3163 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3164 | +<!--Generated by SWIFTStandards Workstation (build:R6.1.0.2) on 2009 Jan 08 17:30:53--> |
3165 | +<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"> |
3166 | + <xs:element name="Document" type="Document"/> |
3167 | + <xs:complexType name="AccountIdentification4Choice"> |
3168 | + <xs:sequence> |
3169 | + <xs:choice> |
3170 | + <xs:element name="IBAN" type="IBAN2007Identifier"/> |
3171 | + <xs:element name="Othr" type="GenericAccountIdentification1"/> |
3172 | + </xs:choice> |
3173 | + </xs:sequence> |
3174 | + </xs:complexType> |
3175 | + <xs:complexType name="AccountSchemeName1Choice"> |
3176 | + <xs:sequence> |
3177 | + <xs:choice> |
3178 | + <xs:element name="Cd" type="ExternalAccountIdentification1Code"/> |
3179 | + <xs:element name="Prtry" type="Max35Text"/> |
3180 | + </xs:choice> |
3181 | + </xs:sequence> |
3182 | + </xs:complexType> |
3183 | + <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType"> |
3184 | + <xs:restriction base="xs:decimal"> |
3185 | + <xs:minInclusive value="0"/> |
3186 | + <xs:fractionDigits value="5"/> |
3187 | + <xs:totalDigits value="18"/> |
3188 | + </xs:restriction> |
3189 | + </xs:simpleType> |
3190 | + <xs:complexType name="ActiveOrHistoricCurrencyAndAmount"> |
3191 | + <xs:simpleContent> |
3192 | + <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType"> |
3193 | + <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/> |
3194 | + </xs:extension> |
3195 | + </xs:simpleContent> |
3196 | + </xs:complexType> |
3197 | + <xs:simpleType name="ActiveOrHistoricCurrencyCode"> |
3198 | + <xs:restriction base="xs:string"> |
3199 | + <xs:pattern value="[A-Z]{3,3}"/> |
3200 | + </xs:restriction> |
3201 | + </xs:simpleType> |
3202 | + <xs:simpleType name="AddressType2Code"> |
3203 | + <xs:restriction base="xs:string"> |
3204 | + <xs:enumeration value="ADDR"/> |
3205 | + <xs:enumeration value="PBOX"/> |
3206 | + <xs:enumeration value="HOME"/> |
3207 | + <xs:enumeration value="BIZZ"/> |
3208 | + <xs:enumeration value="MLTO"/> |
3209 | + <xs:enumeration value="DLVY"/> |
3210 | + </xs:restriction> |
3211 | + </xs:simpleType> |
3212 | + <xs:complexType name="AmendmentInformationDetails6"> |
3213 | + <xs:sequence> |
3214 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlMndtId" type="Max35Text"/> |
3215 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrSchmeId" type="PartyIdentification32"/> |
3216 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/> |
3217 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgtAcct" type="CashAccount16"/> |
3218 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtr" type="PartyIdentification32"/> |
3219 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAcct" type="CashAccount16"/> |
3220 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/> |
3221 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgtAcct" type="CashAccount16"/> |
3222 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFnlColltnDt" type="ISODate"/> |
3223 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFrqcy" type="Frequency1Code"/> |
3224 | + </xs:sequence> |
3225 | + </xs:complexType> |
3226 | + <xs:simpleType name="AnyBICIdentifier"> |
3227 | + <xs:restriction base="xs:string"> |
3228 | + <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/> |
3229 | + </xs:restriction> |
3230 | + </xs:simpleType> |
3231 | + <xs:complexType name="Authorisation1Choice"> |
3232 | + <xs:sequence> |
3233 | + <xs:choice> |
3234 | + <xs:element name="Cd" type="Authorisation1Code"/> |
3235 | + <xs:element name="Prtry" type="Max128Text"/> |
3236 | + </xs:choice> |
3237 | + </xs:sequence> |
3238 | + </xs:complexType> |
3239 | + <xs:simpleType name="Authorisation1Code"> |
3240 | + <xs:restriction base="xs:string"> |
3241 | + <xs:enumeration value="AUTH"/> |
3242 | + <xs:enumeration value="FDET"/> |
3243 | + <xs:enumeration value="FSUM"/> |
3244 | + <xs:enumeration value="ILEV"/> |
3245 | + </xs:restriction> |
3246 | + </xs:simpleType> |
3247 | + <xs:simpleType name="BICIdentifier"> |
3248 | + <xs:restriction base="xs:string"> |
3249 | + <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/> |
3250 | + </xs:restriction> |
3251 | + </xs:simpleType> |
3252 | + <xs:simpleType name="BatchBookingIndicator"> |
3253 | + <xs:restriction base="xs:boolean"/> |
3254 | + </xs:simpleType> |
3255 | + <xs:complexType name="BranchAndFinancialInstitutionIdentification4"> |
3256 | + <xs:sequence> |
3257 | + <xs:element name="FinInstnId" type="FinancialInstitutionIdentification7"/> |
3258 | + <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/> |
3259 | + </xs:sequence> |
3260 | + </xs:complexType> |
3261 | + <xs:complexType name="BranchData2"> |
3262 | + <xs:sequence> |
3263 | + <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/> |
3264 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
3265 | + <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/> |
3266 | + </xs:sequence> |
3267 | + </xs:complexType> |
3268 | + <xs:complexType name="CashAccount16"> |
3269 | + <xs:sequence> |
3270 | + <xs:element name="Id" type="AccountIdentification4Choice"/> |
3271 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2"/> |
3272 | + <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/> |
3273 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/> |
3274 | + </xs:sequence> |
3275 | + </xs:complexType> |
3276 | + <xs:complexType name="CashAccountType2"> |
3277 | + <xs:sequence> |
3278 | + <xs:choice> |
3279 | + <xs:element name="Cd" type="CashAccountType4Code"/> |
3280 | + <xs:element name="Prtry" type="Max35Text"/> |
3281 | + </xs:choice> |
3282 | + </xs:sequence> |
3283 | + </xs:complexType> |
3284 | + <xs:simpleType name="CashAccountType4Code"> |
3285 | + <xs:restriction base="xs:string"> |
3286 | + <xs:enumeration value="CASH"/> |
3287 | + <xs:enumeration value="CHAR"/> |
3288 | + <xs:enumeration value="COMM"/> |
3289 | + <xs:enumeration value="TAXE"/> |
3290 | + <xs:enumeration value="CISH"/> |
3291 | + <xs:enumeration value="TRAS"/> |
3292 | + <xs:enumeration value="SACC"/> |
3293 | + <xs:enumeration value="CACC"/> |
3294 | + <xs:enumeration value="SVGS"/> |
3295 | + <xs:enumeration value="ONDP"/> |
3296 | + <xs:enumeration value="MGLD"/> |
3297 | + <xs:enumeration value="NREX"/> |
3298 | + <xs:enumeration value="MOMA"/> |
3299 | + <xs:enumeration value="LOAN"/> |
3300 | + <xs:enumeration value="SLRY"/> |
3301 | + <xs:enumeration value="ODFT"/> |
3302 | + </xs:restriction> |
3303 | + </xs:simpleType> |
3304 | + <xs:complexType name="CategoryPurpose1Choice"> |
3305 | + <xs:sequence> |
3306 | + <xs:choice> |
3307 | + <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/> |
3308 | + <xs:element name="Prtry" type="Max35Text"/> |
3309 | + </xs:choice> |
3310 | + </xs:sequence> |
3311 | + </xs:complexType> |
3312 | + <xs:simpleType name="ChargeBearerType1Code"> |
3313 | + <xs:restriction base="xs:string"> |
3314 | + <xs:enumeration value="DEBT"/> |
3315 | + <xs:enumeration value="CRED"/> |
3316 | + <xs:enumeration value="SHAR"/> |
3317 | + <xs:enumeration value="SLEV"/> |
3318 | + </xs:restriction> |
3319 | + </xs:simpleType> |
3320 | + <xs:complexType name="ClearingSystemIdentification2Choice"> |
3321 | + <xs:sequence> |
3322 | + <xs:choice> |
3323 | + <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/> |
3324 | + <xs:element name="Prtry" type="Max35Text"/> |
3325 | + </xs:choice> |
3326 | + </xs:sequence> |
3327 | + </xs:complexType> |
3328 | + <xs:complexType name="ClearingSystemMemberIdentification2"> |
3329 | + <xs:sequence> |
3330 | + <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/> |
3331 | + <xs:element name="MmbId" type="Max35Text"/> |
3332 | + </xs:sequence> |
3333 | + </xs:complexType> |
3334 | + <xs:complexType name="ContactDetails2"> |
3335 | + <xs:sequence> |
3336 | + <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/> |
3337 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
3338 | + <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/> |
3339 | + <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/> |
3340 | + <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/> |
3341 | + <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/> |
3342 | + <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/> |
3343 | + </xs:sequence> |
3344 | + </xs:complexType> |
3345 | + <xs:simpleType name="CountryCode"> |
3346 | + <xs:restriction base="xs:string"> |
3347 | + <xs:pattern value="[A-Z]{2,2}"/> |
3348 | + </xs:restriction> |
3349 | + </xs:simpleType> |
3350 | + <xs:simpleType name="CreditDebitCode"> |
3351 | + <xs:restriction base="xs:string"> |
3352 | + <xs:enumeration value="CRDT"/> |
3353 | + <xs:enumeration value="DBIT"/> |
3354 | + </xs:restriction> |
3355 | + </xs:simpleType> |
3356 | + <xs:complexType name="CreditorReferenceInformation2"> |
3357 | + <xs:sequence> |
3358 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/> |
3359 | + <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/> |
3360 | + </xs:sequence> |
3361 | + </xs:complexType> |
3362 | + <xs:complexType name="CreditorReferenceType1Choice"> |
3363 | + <xs:sequence> |
3364 | + <xs:choice> |
3365 | + <xs:element name="Cd" type="DocumentType3Code"/> |
3366 | + <xs:element name="Prtry" type="Max35Text"/> |
3367 | + </xs:choice> |
3368 | + </xs:sequence> |
3369 | + </xs:complexType> |
3370 | + <xs:complexType name="CreditorReferenceType2"> |
3371 | + <xs:sequence> |
3372 | + <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/> |
3373 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
3374 | + </xs:sequence> |
3375 | + </xs:complexType> |
3376 | + <xs:complexType name="CustomerDirectDebitInitiationV02"> |
3377 | + <xs:sequence> |
3378 | + <xs:element name="GrpHdr" type="GroupHeader39"/> |
3379 | + <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstructionInformation4"/> |
3380 | + </xs:sequence> |
3381 | + </xs:complexType> |
3382 | + <xs:complexType name="DateAndPlaceOfBirth"> |
3383 | + <xs:sequence> |
3384 | + <xs:element name="BirthDt" type="ISODate"/> |
3385 | + <xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/> |
3386 | + <xs:element name="CityOfBirth" type="Max35Text"/> |
3387 | + <xs:element name="CtryOfBirth" type="CountryCode"/> |
3388 | + </xs:sequence> |
3389 | + </xs:complexType> |
3390 | + <xs:complexType name="DatePeriodDetails"> |
3391 | + <xs:sequence> |
3392 | + <xs:element name="FrDt" type="ISODate"/> |
3393 | + <xs:element name="ToDt" type="ISODate"/> |
3394 | + </xs:sequence> |
3395 | + </xs:complexType> |
3396 | + <xs:simpleType name="DecimalNumber"> |
3397 | + <xs:restriction base="xs:decimal"> |
3398 | + <xs:fractionDigits value="17"/> |
3399 | + <xs:totalDigits value="18"/> |
3400 | + </xs:restriction> |
3401 | + </xs:simpleType> |
3402 | + <xs:complexType name="DirectDebitTransaction6"> |
3403 | + <xs:sequence> |
3404 | + <xs:element maxOccurs="1" minOccurs="0" name="MndtRltdInf" type="MandateRelatedInformation6"/> |
3405 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification32"/> |
3406 | + <xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnId" type="Max35Text"/> |
3407 | + <xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnDt" type="ISODate"/> |
3408 | + </xs:sequence> |
3409 | + </xs:complexType> |
3410 | + <xs:complexType name="DirectDebitTransactionInformation9"> |
3411 | + <xs:sequence> |
3412 | + <xs:element name="PmtId" type="PaymentIdentification1"/> |
3413 | + <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation20"/> |
3414 | + <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3415 | + <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/> |
3416 | + <xs:element maxOccurs="1" minOccurs="0" name="DrctDbtTx" type="DirectDebitTransaction6"/> |
3417 | + <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/> |
3418 | + <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/> |
3419 | + <xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount16"/> |
3420 | + <xs:element name="Dbtr" type="PartyIdentification32"/> |
3421 | + <xs:element name="DbtrAcct" type="CashAccount16"/> |
3422 | + <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/> |
3423 | + <xs:element maxOccurs="1" minOccurs="0" name="InstrForCdtrAgt" type="Max140Text"/> |
3424 | + <xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/> |
3425 | + <xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/> |
3426 | + <xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/> |
3427 | + <xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/> |
3428 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation5"/> |
3429 | + </xs:sequence> |
3430 | + </xs:complexType> |
3431 | + <xs:complexType name="Document"> |
3432 | + <xs:sequence> |
3433 | + <xs:element name="CstmrDrctDbtInitn" type="CustomerDirectDebitInitiationV02"/> |
3434 | + </xs:sequence> |
3435 | + </xs:complexType> |
3436 | + <xs:complexType name="DocumentAdjustment1"> |
3437 | + <xs:sequence> |
3438 | + <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3439 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/> |
3440 | + <xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/> |
3441 | + <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/> |
3442 | + </xs:sequence> |
3443 | + </xs:complexType> |
3444 | + <xs:simpleType name="DocumentType3Code"> |
3445 | + <xs:restriction base="xs:string"> |
3446 | + <xs:enumeration value="RADM"/> |
3447 | + <xs:enumeration value="RPIN"/> |
3448 | + <xs:enumeration value="FXDR"/> |
3449 | + <xs:enumeration value="DISP"/> |
3450 | + <xs:enumeration value="PUOR"/> |
3451 | + <xs:enumeration value="SCOR"/> |
3452 | + </xs:restriction> |
3453 | + </xs:simpleType> |
3454 | + <xs:simpleType name="DocumentType5Code"> |
3455 | + <xs:restriction base="xs:string"> |
3456 | + <xs:enumeration value="MSIN"/> |
3457 | + <xs:enumeration value="CNFA"/> |
3458 | + <xs:enumeration value="DNFA"/> |
3459 | + <xs:enumeration value="CINV"/> |
3460 | + <xs:enumeration value="CREN"/> |
3461 | + <xs:enumeration value="DEBN"/> |
3462 | + <xs:enumeration value="HIRI"/> |
3463 | + <xs:enumeration value="SBIN"/> |
3464 | + <xs:enumeration value="CMCN"/> |
3465 | + <xs:enumeration value="SOAC"/> |
3466 | + <xs:enumeration value="DISP"/> |
3467 | + <xs:enumeration value="BOLD"/> |
3468 | + <xs:enumeration value="VCHR"/> |
3469 | + <xs:enumeration value="AROI"/> |
3470 | + <xs:enumeration value="TSUT"/> |
3471 | + </xs:restriction> |
3472 | + </xs:simpleType> |
3473 | + <xs:simpleType name="ExternalAccountIdentification1Code"> |
3474 | + <xs:restriction base="xs:string"> |
3475 | + <xs:minLength value="1"/> |
3476 | + <xs:maxLength value="4"/> |
3477 | + </xs:restriction> |
3478 | + </xs:simpleType> |
3479 | + <xs:simpleType name="ExternalCategoryPurpose1Code"> |
3480 | + <xs:restriction base="xs:string"> |
3481 | + <xs:minLength value="1"/> |
3482 | + <xs:maxLength value="4"/> |
3483 | + </xs:restriction> |
3484 | + </xs:simpleType> |
3485 | + <xs:simpleType name="ExternalClearingSystemIdentification1Code"> |
3486 | + <xs:restriction base="xs:string"> |
3487 | + <xs:minLength value="1"/> |
3488 | + <xs:maxLength value="5"/> |
3489 | + </xs:restriction> |
3490 | + </xs:simpleType> |
3491 | + <xs:simpleType name="ExternalFinancialInstitutionIdentification1Code"> |
3492 | + <xs:restriction base="xs:string"> |
3493 | + <xs:minLength value="1"/> |
3494 | + <xs:maxLength value="4"/> |
3495 | + </xs:restriction> |
3496 | + </xs:simpleType> |
3497 | + <xs:simpleType name="ExternalLocalInstrument1Code"> |
3498 | + <xs:restriction base="xs:string"> |
3499 | + <xs:minLength value="1"/> |
3500 | + <xs:maxLength value="35"/> |
3501 | + </xs:restriction> |
3502 | + </xs:simpleType> |
3503 | + <xs:simpleType name="ExternalOrganisationIdentification1Code"> |
3504 | + <xs:restriction base="xs:string"> |
3505 | + <xs:minLength value="1"/> |
3506 | + <xs:maxLength value="4"/> |
3507 | + </xs:restriction> |
3508 | + </xs:simpleType> |
3509 | + <xs:simpleType name="ExternalPersonIdentification1Code"> |
3510 | + <xs:restriction base="xs:string"> |
3511 | + <xs:minLength value="1"/> |
3512 | + <xs:maxLength value="4"/> |
3513 | + </xs:restriction> |
3514 | + </xs:simpleType> |
3515 | + <xs:simpleType name="ExternalPurpose1Code"> |
3516 | + <xs:restriction base="xs:string"> |
3517 | + <xs:minLength value="1"/> |
3518 | + <xs:maxLength value="4"/> |
3519 | + </xs:restriction> |
3520 | + </xs:simpleType> |
3521 | + <xs:simpleType name="ExternalServiceLevel1Code"> |
3522 | + <xs:restriction base="xs:string"> |
3523 | + <xs:minLength value="1"/> |
3524 | + <xs:maxLength value="4"/> |
3525 | + </xs:restriction> |
3526 | + </xs:simpleType> |
3527 | + <xs:complexType name="FinancialIdentificationSchemeName1Choice"> |
3528 | + <xs:sequence> |
3529 | + <xs:choice> |
3530 | + <xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/> |
3531 | + <xs:element name="Prtry" type="Max35Text"/> |
3532 | + </xs:choice> |
3533 | + </xs:sequence> |
3534 | + </xs:complexType> |
3535 | + <xs:complexType name="FinancialInstitutionIdentification7"> |
3536 | + <xs:sequence> |
3537 | + <xs:element maxOccurs="1" minOccurs="0" name="BIC" type="BICIdentifier"/> |
3538 | + <xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/> |
3539 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
3540 | + <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/> |
3541 | + <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/> |
3542 | + </xs:sequence> |
3543 | + </xs:complexType> |
3544 | + <xs:simpleType name="Frequency1Code"> |
3545 | + <xs:restriction base="xs:string"> |
3546 | + <xs:enumeration value="YEAR"/> |
3547 | + <xs:enumeration value="MNTH"/> |
3548 | + <xs:enumeration value="QURT"/> |
3549 | + <xs:enumeration value="MIAN"/> |
3550 | + <xs:enumeration value="WEEK"/> |
3551 | + <xs:enumeration value="DAIL"/> |
3552 | + <xs:enumeration value="ADHO"/> |
3553 | + <xs:enumeration value="INDA"/> |
3554 | + </xs:restriction> |
3555 | + </xs:simpleType> |
3556 | + <xs:complexType name="GenericAccountIdentification1"> |
3557 | + <xs:sequence> |
3558 | + <xs:element name="Id" type="Max34Text"/> |
3559 | + <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/> |
3560 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
3561 | + </xs:sequence> |
3562 | + </xs:complexType> |
3563 | + <xs:complexType name="GenericFinancialIdentification1"> |
3564 | + <xs:sequence> |
3565 | + <xs:element name="Id" type="Max35Text"/> |
3566 | + <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/> |
3567 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
3568 | + </xs:sequence> |
3569 | + </xs:complexType> |
3570 | + <xs:complexType name="GenericOrganisationIdentification1"> |
3571 | + <xs:sequence> |
3572 | + <xs:element name="Id" type="Max35Text"/> |
3573 | + <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/> |
3574 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
3575 | + </xs:sequence> |
3576 | + </xs:complexType> |
3577 | + <xs:complexType name="GenericPersonIdentification1"> |
3578 | + <xs:sequence> |
3579 | + <xs:element name="Id" type="Max35Text"/> |
3580 | + <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/> |
3581 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
3582 | + </xs:sequence> |
3583 | + </xs:complexType> |
3584 | + <xs:complexType name="GroupHeader39"> |
3585 | + <xs:sequence> |
3586 | + <xs:element name="MsgId" type="Max35Text"/> |
3587 | + <xs:element name="CreDtTm" type="ISODateTime"/> |
3588 | + <xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/> |
3589 | + <xs:element name="NbOfTxs" type="Max15NumericText"/> |
3590 | + <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/> |
3591 | + <xs:element name="InitgPty" type="PartyIdentification32"/> |
3592 | + <xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification4"/> |
3593 | + </xs:sequence> |
3594 | + </xs:complexType> |
3595 | + <xs:simpleType name="IBAN2007Identifier"> |
3596 | + <xs:restriction base="xs:string"> |
3597 | + <xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/> |
3598 | + </xs:restriction> |
3599 | + </xs:simpleType> |
3600 | + <xs:simpleType name="ISODate"> |
3601 | + <xs:restriction base="xs:date"/> |
3602 | + </xs:simpleType> |
3603 | + <xs:simpleType name="ISODateTime"> |
3604 | + <xs:restriction base="xs:dateTime"/> |
3605 | + </xs:simpleType> |
3606 | + <xs:complexType name="LocalInstrument2Choice"> |
3607 | + <xs:sequence> |
3608 | + <xs:choice> |
3609 | + <xs:element name="Cd" type="ExternalLocalInstrument1Code"/> |
3610 | + <xs:element name="Prtry" type="Max35Text"/> |
3611 | + </xs:choice> |
3612 | + </xs:sequence> |
3613 | + </xs:complexType> |
3614 | + <xs:complexType name="MandateRelatedInformation6"> |
3615 | + <xs:sequence> |
3616 | + <xs:element maxOccurs="1" minOccurs="0" name="MndtId" type="Max35Text"/> |
3617 | + <xs:element maxOccurs="1" minOccurs="0" name="DtOfSgntr" type="ISODate"/> |
3618 | + <xs:element maxOccurs="1" minOccurs="0" name="AmdmntInd" type="TrueFalseIndicator"/> |
3619 | + <xs:element maxOccurs="1" minOccurs="0" name="AmdmntInfDtls" type="AmendmentInformationDetails6"/> |
3620 | + <xs:element maxOccurs="1" minOccurs="0" name="ElctrncSgntr" type="Max1025Text"/> |
3621 | + <xs:element maxOccurs="1" minOccurs="0" name="FrstColltnDt" type="ISODate"/> |
3622 | + <xs:element maxOccurs="1" minOccurs="0" name="FnlColltnDt" type="ISODate"/> |
3623 | + <xs:element maxOccurs="1" minOccurs="0" name="Frqcy" type="Frequency1Code"/> |
3624 | + </xs:sequence> |
3625 | + </xs:complexType> |
3626 | + <xs:simpleType name="Max1025Text"> |
3627 | + <xs:restriction base="xs:string"> |
3628 | + <xs:minLength value="1"/> |
3629 | + <xs:maxLength value="1025"/> |
3630 | + </xs:restriction> |
3631 | + </xs:simpleType> |
3632 | + <xs:simpleType name="Max10Text"> |
3633 | + <xs:restriction base="xs:string"> |
3634 | + <xs:minLength value="1"/> |
3635 | + <xs:maxLength value="10"/> |
3636 | + </xs:restriction> |
3637 | + </xs:simpleType> |
3638 | + <xs:simpleType name="Max128Text"> |
3639 | + <xs:restriction base="xs:string"> |
3640 | + <xs:minLength value="1"/> |
3641 | + <xs:maxLength value="128"/> |
3642 | + </xs:restriction> |
3643 | + </xs:simpleType> |
3644 | + <xs:simpleType name="Max140Text"> |
3645 | + <xs:restriction base="xs:string"> |
3646 | + <xs:minLength value="1"/> |
3647 | + <xs:maxLength value="140"/> |
3648 | + </xs:restriction> |
3649 | + </xs:simpleType> |
3650 | + <xs:simpleType name="Max15NumericText"> |
3651 | + <xs:restriction base="xs:string"> |
3652 | + <xs:pattern value="[0-9]{1,15}"/> |
3653 | + </xs:restriction> |
3654 | + </xs:simpleType> |
3655 | + <xs:simpleType name="Max16Text"> |
3656 | + <xs:restriction base="xs:string"> |
3657 | + <xs:minLength value="1"/> |
3658 | + <xs:maxLength value="16"/> |
3659 | + </xs:restriction> |
3660 | + </xs:simpleType> |
3661 | + <xs:simpleType name="Max2048Text"> |
3662 | + <xs:restriction base="xs:string"> |
3663 | + <xs:minLength value="1"/> |
3664 | + <xs:maxLength value="2048"/> |
3665 | + </xs:restriction> |
3666 | + </xs:simpleType> |
3667 | + <xs:simpleType name="Max34Text"> |
3668 | + <xs:restriction base="xs:string"> |
3669 | + <xs:minLength value="1"/> |
3670 | + <xs:maxLength value="34"/> |
3671 | + </xs:restriction> |
3672 | + </xs:simpleType> |
3673 | + <xs:simpleType name="Max35Text"> |
3674 | + <xs:restriction base="xs:string"> |
3675 | + <xs:minLength value="1"/> |
3676 | + <xs:maxLength value="35"/> |
3677 | + </xs:restriction> |
3678 | + </xs:simpleType> |
3679 | + <xs:simpleType name="Max4Text"> |
3680 | + <xs:restriction base="xs:string"> |
3681 | + <xs:minLength value="1"/> |
3682 | + <xs:maxLength value="4"/> |
3683 | + </xs:restriction> |
3684 | + </xs:simpleType> |
3685 | + <xs:simpleType name="Max70Text"> |
3686 | + <xs:restriction base="xs:string"> |
3687 | + <xs:minLength value="1"/> |
3688 | + <xs:maxLength value="70"/> |
3689 | + </xs:restriction> |
3690 | + </xs:simpleType> |
3691 | + <xs:complexType name="NameAndAddress10"> |
3692 | + <xs:sequence> |
3693 | + <xs:element name="Nm" type="Max140Text"/> |
3694 | + <xs:element name="Adr" type="PostalAddress6"/> |
3695 | + </xs:sequence> |
3696 | + </xs:complexType> |
3697 | + <xs:simpleType name="NamePrefix1Code"> |
3698 | + <xs:restriction base="xs:string"> |
3699 | + <xs:enumeration value="DOCT"/> |
3700 | + <xs:enumeration value="MIST"/> |
3701 | + <xs:enumeration value="MISS"/> |
3702 | + <xs:enumeration value="MADM"/> |
3703 | + </xs:restriction> |
3704 | + </xs:simpleType> |
3705 | + <xs:simpleType name="Number"> |
3706 | + <xs:restriction base="xs:decimal"> |
3707 | + <xs:fractionDigits value="0"/> |
3708 | + <xs:totalDigits value="18"/> |
3709 | + </xs:restriction> |
3710 | + </xs:simpleType> |
3711 | + <xs:complexType name="OrganisationIdentification4"> |
3712 | + <xs:sequence> |
3713 | + <xs:element maxOccurs="1" minOccurs="0" name="BICOrBEI" type="AnyBICIdentifier"/> |
3714 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/> |
3715 | + </xs:sequence> |
3716 | + </xs:complexType> |
3717 | + <xs:complexType name="OrganisationIdentificationSchemeName1Choice"> |
3718 | + <xs:sequence> |
3719 | + <xs:choice> |
3720 | + <xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/> |
3721 | + <xs:element name="Prtry" type="Max35Text"/> |
3722 | + </xs:choice> |
3723 | + </xs:sequence> |
3724 | + </xs:complexType> |
3725 | + <xs:complexType name="Party6Choice"> |
3726 | + <xs:sequence> |
3727 | + <xs:choice> |
3728 | + <xs:element name="OrgId" type="OrganisationIdentification4"/> |
3729 | + <xs:element name="PrvtId" type="PersonIdentification5"/> |
3730 | + </xs:choice> |
3731 | + </xs:sequence> |
3732 | + </xs:complexType> |
3733 | + <xs:complexType name="PartyIdentification32"> |
3734 | + <xs:sequence> |
3735 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
3736 | + <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/> |
3737 | + <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party6Choice"/> |
3738 | + <xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/> |
3739 | + <xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/> |
3740 | + </xs:sequence> |
3741 | + </xs:complexType> |
3742 | + <xs:complexType name="PaymentIdentification1"> |
3743 | + <xs:sequence> |
3744 | + <xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/> |
3745 | + <xs:element name="EndToEndId" type="Max35Text"/> |
3746 | + </xs:sequence> |
3747 | + </xs:complexType> |
3748 | + <xs:complexType name="PaymentInstructionInformation4"> |
3749 | + <xs:sequence> |
3750 | + <xs:element name="PmtInfId" type="Max35Text"/> |
3751 | + <xs:element name="PmtMtd" type="PaymentMethod2Code"/> |
3752 | + <xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/> |
3753 | + <xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/> |
3754 | + <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/> |
3755 | + <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation20"/> |
3756 | + <xs:element name="ReqdColltnDt" type="ISODate"/> |
3757 | + <xs:element name="Cdtr" type="PartyIdentification32"/> |
3758 | + <xs:element name="CdtrAcct" type="CashAccount16"/> |
3759 | + <xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/> |
3760 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount16"/> |
3761 | + <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/> |
3762 | + <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/> |
3763 | + <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount16"/> |
3764 | + <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification4"/> |
3765 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification32"/> |
3766 | + <xs:element maxOccurs="unbounded" minOccurs="1" name="DrctDbtTxInf" type="DirectDebitTransactionInformation9"/> |
3767 | + </xs:sequence> |
3768 | + </xs:complexType> |
3769 | + <xs:simpleType name="PaymentMethod2Code"> |
3770 | + <xs:restriction base="xs:string"> |
3771 | + <xs:enumeration value="DD"/> |
3772 | + </xs:restriction> |
3773 | + </xs:simpleType> |
3774 | + <xs:complexType name="PaymentTypeInformation20"> |
3775 | + <xs:sequence> |
3776 | + <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/> |
3777 | + <xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/> |
3778 | + <xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/> |
3779 | + <xs:element maxOccurs="1" minOccurs="0" name="SeqTp" type="SequenceType1Code"/> |
3780 | + <xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/> |
3781 | + </xs:sequence> |
3782 | + </xs:complexType> |
3783 | + <xs:simpleType name="PercentageRate"> |
3784 | + <xs:restriction base="xs:decimal"> |
3785 | + <xs:fractionDigits value="10"/> |
3786 | + <xs:totalDigits value="11"/> |
3787 | + </xs:restriction> |
3788 | + </xs:simpleType> |
3789 | + <xs:complexType name="PersonIdentification5"> |
3790 | + <xs:sequence> |
3791 | + <xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/> |
3792 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/> |
3793 | + </xs:sequence> |
3794 | + </xs:complexType> |
3795 | + <xs:complexType name="PersonIdentificationSchemeName1Choice"> |
3796 | + <xs:sequence> |
3797 | + <xs:choice> |
3798 | + <xs:element name="Cd" type="ExternalPersonIdentification1Code"/> |
3799 | + <xs:element name="Prtry" type="Max35Text"/> |
3800 | + </xs:choice> |
3801 | + </xs:sequence> |
3802 | + </xs:complexType> |
3803 | + <xs:simpleType name="PhoneNumber"> |
3804 | + <xs:restriction base="xs:string"> |
3805 | + <xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/> |
3806 | + </xs:restriction> |
3807 | + </xs:simpleType> |
3808 | + <xs:complexType name="PostalAddress6"> |
3809 | + <xs:sequence> |
3810 | + <xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/> |
3811 | + <xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/> |
3812 | + <xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/> |
3813 | + <xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/> |
3814 | + <xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/> |
3815 | + <xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/> |
3816 | + <xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/> |
3817 | + <xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/> |
3818 | + <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/> |
3819 | + <xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/> |
3820 | + </xs:sequence> |
3821 | + </xs:complexType> |
3822 | + <xs:simpleType name="Priority2Code"> |
3823 | + <xs:restriction base="xs:string"> |
3824 | + <xs:enumeration value="HIGH"/> |
3825 | + <xs:enumeration value="NORM"/> |
3826 | + </xs:restriction> |
3827 | + </xs:simpleType> |
3828 | + <xs:complexType name="Purpose2Choice"> |
3829 | + <xs:sequence> |
3830 | + <xs:choice> |
3831 | + <xs:element name="Cd" type="ExternalPurpose1Code"/> |
3832 | + <xs:element name="Prtry" type="Max35Text"/> |
3833 | + </xs:choice> |
3834 | + </xs:sequence> |
3835 | + </xs:complexType> |
3836 | + <xs:complexType name="ReferredDocumentInformation3"> |
3837 | + <xs:sequence> |
3838 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/> |
3839 | + <xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/> |
3840 | + <xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/> |
3841 | + </xs:sequence> |
3842 | + </xs:complexType> |
3843 | + <xs:complexType name="ReferredDocumentType1Choice"> |
3844 | + <xs:sequence> |
3845 | + <xs:choice> |
3846 | + <xs:element name="Cd" type="DocumentType5Code"/> |
3847 | + <xs:element name="Prtry" type="Max35Text"/> |
3848 | + </xs:choice> |
3849 | + </xs:sequence> |
3850 | + </xs:complexType> |
3851 | + <xs:complexType name="ReferredDocumentType2"> |
3852 | + <xs:sequence> |
3853 | + <xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/> |
3854 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
3855 | + </xs:sequence> |
3856 | + </xs:complexType> |
3857 | + <xs:complexType name="RegulatoryAuthority2"> |
3858 | + <xs:sequence> |
3859 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
3860 | + <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/> |
3861 | + </xs:sequence> |
3862 | + </xs:complexType> |
3863 | + <xs:complexType name="RegulatoryReporting3"> |
3864 | + <xs:sequence> |
3865 | + <xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/> |
3866 | + <xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/> |
3867 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/> |
3868 | + </xs:sequence> |
3869 | + </xs:complexType> |
3870 | + <xs:simpleType name="RegulatoryReportingType1Code"> |
3871 | + <xs:restriction base="xs:string"> |
3872 | + <xs:enumeration value="CRED"/> |
3873 | + <xs:enumeration value="DEBT"/> |
3874 | + <xs:enumeration value="BOTH"/> |
3875 | + </xs:restriction> |
3876 | + </xs:simpleType> |
3877 | + <xs:complexType name="RemittanceAmount1"> |
3878 | + <xs:sequence> |
3879 | + <xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3880 | + <xs:element maxOccurs="1" minOccurs="0" name="DscntApldAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3881 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3882 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3883 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/> |
3884 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3885 | + </xs:sequence> |
3886 | + </xs:complexType> |
3887 | + <xs:complexType name="RemittanceInformation5"> |
3888 | + <xs:sequence> |
3889 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/> |
3890 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation7"/> |
3891 | + </xs:sequence> |
3892 | + </xs:complexType> |
3893 | + <xs:complexType name="RemittanceLocation2"> |
3894 | + <xs:sequence> |
3895 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/> |
3896 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/> |
3897 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/> |
3898 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/> |
3899 | + </xs:sequence> |
3900 | + </xs:complexType> |
3901 | + <xs:simpleType name="RemittanceLocationMethod2Code"> |
3902 | + <xs:restriction base="xs:string"> |
3903 | + <xs:enumeration value="FAXI"/> |
3904 | + <xs:enumeration value="EDIC"/> |
3905 | + <xs:enumeration value="URID"/> |
3906 | + <xs:enumeration value="EMAL"/> |
3907 | + <xs:enumeration value="POST"/> |
3908 | + <xs:enumeration value="SMSM"/> |
3909 | + </xs:restriction> |
3910 | + </xs:simpleType> |
3911 | + <xs:simpleType name="SequenceType1Code"> |
3912 | + <xs:restriction base="xs:string"> |
3913 | + <xs:enumeration value="FRST"/> |
3914 | + <xs:enumeration value="RCUR"/> |
3915 | + <xs:enumeration value="FNAL"/> |
3916 | + <xs:enumeration value="OOFF"/> |
3917 | + </xs:restriction> |
3918 | + </xs:simpleType> |
3919 | + <xs:complexType name="ServiceLevel8Choice"> |
3920 | + <xs:sequence> |
3921 | + <xs:choice> |
3922 | + <xs:element name="Cd" type="ExternalServiceLevel1Code"/> |
3923 | + <xs:element name="Prtry" type="Max35Text"/> |
3924 | + </xs:choice> |
3925 | + </xs:sequence> |
3926 | + </xs:complexType> |
3927 | + <xs:complexType name="StructuredRegulatoryReporting3"> |
3928 | + <xs:sequence> |
3929 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/> |
3930 | + <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/> |
3931 | + <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/> |
3932 | + <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/> |
3933 | + <xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3934 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/> |
3935 | + </xs:sequence> |
3936 | + </xs:complexType> |
3937 | + <xs:complexType name="StructuredRemittanceInformation7"> |
3938 | + <xs:sequence> |
3939 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/> |
3940 | + <xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount1"/> |
3941 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/> |
3942 | + <xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification32"/> |
3943 | + <xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification32"/> |
3944 | + <xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/> |
3945 | + </xs:sequence> |
3946 | + </xs:complexType> |
3947 | + <xs:complexType name="TaxAmount1"> |
3948 | + <xs:sequence> |
3949 | + <xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/> |
3950 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3951 | + <xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3952 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/> |
3953 | + </xs:sequence> |
3954 | + </xs:complexType> |
3955 | + <xs:complexType name="TaxAuthorisation1"> |
3956 | + <xs:sequence> |
3957 | + <xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/> |
3958 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
3959 | + </xs:sequence> |
3960 | + </xs:complexType> |
3961 | + <xs:complexType name="TaxInformation3"> |
3962 | + <xs:sequence> |
3963 | + <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/> |
3964 | + <xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/> |
3965 | + <xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/> |
3966 | + <xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/> |
3967 | + <xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/> |
3968 | + <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3969 | + <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
3970 | + <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/> |
3971 | + <xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/> |
3972 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/> |
3973 | + </xs:sequence> |
3974 | + </xs:complexType> |
3975 | + <xs:complexType name="TaxParty1"> |
3976 | + <xs:sequence> |
3977 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/> |
3978 | + <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/> |
3979 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/> |
3980 | + </xs:sequence> |
3981 | + </xs:complexType> |
3982 | + <xs:complexType name="TaxParty2"> |
3983 | + <xs:sequence> |
3984 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/> |
3985 | + <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/> |
3986 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/> |
3987 | + <xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/> |
3988 | + </xs:sequence> |
3989 | + </xs:complexType> |
3990 | + <xs:complexType name="TaxPeriod1"> |
3991 | + <xs:sequence> |
3992 | + <xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/> |
3993 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/> |
3994 | + <xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/> |
3995 | + </xs:sequence> |
3996 | + </xs:complexType> |
3997 | + <xs:complexType name="TaxRecord1"> |
3998 | + <xs:sequence> |
3999 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/> |
4000 | + <xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/> |
4001 | + <xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/> |
4002 | + <xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/> |
4003 | + <xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/> |
4004 | + <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/> |
4005 | + <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/> |
4006 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/> |
4007 | + <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/> |
4008 | + </xs:sequence> |
4009 | + </xs:complexType> |
4010 | + <xs:complexType name="TaxRecordDetails1"> |
4011 | + <xs:sequence> |
4012 | + <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/> |
4013 | + <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4014 | + </xs:sequence> |
4015 | + </xs:complexType> |
4016 | + <xs:simpleType name="TaxRecordPeriod1Code"> |
4017 | + <xs:restriction base="xs:string"> |
4018 | + <xs:enumeration value="MM01"/> |
4019 | + <xs:enumeration value="MM02"/> |
4020 | + <xs:enumeration value="MM03"/> |
4021 | + <xs:enumeration value="MM04"/> |
4022 | + <xs:enumeration value="MM05"/> |
4023 | + <xs:enumeration value="MM06"/> |
4024 | + <xs:enumeration value="MM07"/> |
4025 | + <xs:enumeration value="MM08"/> |
4026 | + <xs:enumeration value="MM09"/> |
4027 | + <xs:enumeration value="MM10"/> |
4028 | + <xs:enumeration value="MM11"/> |
4029 | + <xs:enumeration value="MM12"/> |
4030 | + <xs:enumeration value="QTR1"/> |
4031 | + <xs:enumeration value="QTR2"/> |
4032 | + <xs:enumeration value="QTR3"/> |
4033 | + <xs:enumeration value="QTR4"/> |
4034 | + <xs:enumeration value="HLF1"/> |
4035 | + <xs:enumeration value="HLF2"/> |
4036 | + </xs:restriction> |
4037 | + </xs:simpleType> |
4038 | + <xs:simpleType name="TrueFalseIndicator"> |
4039 | + <xs:restriction base="xs:boolean"/> |
4040 | + </xs:simpleType> |
4041 | +</xs:schema> |
4042 | |
4043 | === added file 'account_banking_sepa_direct_debit/data/pain.008.001.03.xsd' |
4044 | --- account_banking_sepa_direct_debit/data/pain.008.001.03.xsd 1970-01-01 00:00:00 +0000 |
4045 | +++ account_banking_sepa_direct_debit/data/pain.008.001.03.xsd 2014-01-13 12:42:46 +0000 |
4046 | @@ -0,0 +1,925 @@ |
4047 | +<?xml version="1.0" encoding="UTF-8"?> |
4048 | +<!--Generated by SWIFTStandards Workstation (build:R7.1.30.4) on 2012 Jun 07 20:47:19--> |
4049 | +<xs:schema elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.008.001.03" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.03" xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
4050 | + <xs:element name="Document" type="Document"/> |
4051 | + <xs:complexType name="AccountIdentification4Choice"> |
4052 | + <xs:sequence> |
4053 | + <xs:choice> |
4054 | + <xs:element name="IBAN" type="IBAN2007Identifier"/> |
4055 | + <xs:element name="Othr" type="GenericAccountIdentification1"/> |
4056 | + </xs:choice> |
4057 | + </xs:sequence> |
4058 | + </xs:complexType> |
4059 | + <xs:complexType name="AccountSchemeName1Choice"> |
4060 | + <xs:sequence> |
4061 | + <xs:choice> |
4062 | + <xs:element name="Cd" type="ExternalAccountIdentification1Code"/> |
4063 | + <xs:element name="Prtry" type="Max35Text"/> |
4064 | + </xs:choice> |
4065 | + </xs:sequence> |
4066 | + </xs:complexType> |
4067 | + <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType"> |
4068 | + <xs:restriction base="xs:decimal"> |
4069 | + <xs:fractionDigits value="5"/> |
4070 | + <xs:totalDigits value="18"/> |
4071 | + <xs:minInclusive value="0"/> |
4072 | + </xs:restriction> |
4073 | + </xs:simpleType> |
4074 | + <xs:complexType name="ActiveOrHistoricCurrencyAndAmount"> |
4075 | + <xs:simpleContent> |
4076 | + <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType"> |
4077 | + <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/> |
4078 | + </xs:extension> |
4079 | + </xs:simpleContent> |
4080 | + </xs:complexType> |
4081 | + <xs:simpleType name="ActiveOrHistoricCurrencyCode"> |
4082 | + <xs:restriction base="xs:string"> |
4083 | + <xs:pattern value="[A-Z]{3,3}"/> |
4084 | + </xs:restriction> |
4085 | + </xs:simpleType> |
4086 | + <xs:simpleType name="AddressType2Code"> |
4087 | + <xs:restriction base="xs:string"> |
4088 | + <xs:enumeration value="ADDR"/> |
4089 | + <xs:enumeration value="PBOX"/> |
4090 | + <xs:enumeration value="HOME"/> |
4091 | + <xs:enumeration value="BIZZ"/> |
4092 | + <xs:enumeration value="MLTO"/> |
4093 | + <xs:enumeration value="DLVY"/> |
4094 | + </xs:restriction> |
4095 | + </xs:simpleType> |
4096 | + <xs:complexType name="AmendmentInformationDetails8"> |
4097 | + <xs:sequence> |
4098 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlMndtId" type="Max35Text"/> |
4099 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrSchmeId" type="PartyIdentification43"/> |
4100 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/> |
4101 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgtAcct" type="CashAccount24"/> |
4102 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtr" type="PartyIdentification43"/> |
4103 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAcct" type="CashAccount24"/> |
4104 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/> |
4105 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgtAcct" type="CashAccount24"/> |
4106 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFnlColltnDt" type="ISODate"/> |
4107 | + <xs:element maxOccurs="1" minOccurs="0" name="OrgnlFrqcy" type="Frequency6Code"/> |
4108 | + </xs:sequence> |
4109 | + </xs:complexType> |
4110 | + <xs:simpleType name="AnyBICIdentifier"> |
4111 | + <xs:restriction base="xs:string"> |
4112 | + <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/> |
4113 | + </xs:restriction> |
4114 | + </xs:simpleType> |
4115 | + <xs:complexType name="Authorisation1Choice"> |
4116 | + <xs:sequence> |
4117 | + <xs:choice> |
4118 | + <xs:element name="Cd" type="Authorisation1Code"/> |
4119 | + <xs:element name="Prtry" type="Max128Text"/> |
4120 | + </xs:choice> |
4121 | + </xs:sequence> |
4122 | + </xs:complexType> |
4123 | + <xs:simpleType name="Authorisation1Code"> |
4124 | + <xs:restriction base="xs:string"> |
4125 | + <xs:enumeration value="AUTH"/> |
4126 | + <xs:enumeration value="FDET"/> |
4127 | + <xs:enumeration value="FSUM"/> |
4128 | + <xs:enumeration value="ILEV"/> |
4129 | + </xs:restriction> |
4130 | + </xs:simpleType> |
4131 | + <xs:simpleType name="BICFIIdentifier"> |
4132 | + <xs:restriction base="xs:string"> |
4133 | + <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/> |
4134 | + </xs:restriction> |
4135 | + </xs:simpleType> |
4136 | + <xs:simpleType name="BatchBookingIndicator"> |
4137 | + <xs:restriction base="xs:boolean"/> |
4138 | + </xs:simpleType> |
4139 | + <xs:complexType name="BranchAndFinancialInstitutionIdentification5"> |
4140 | + <xs:sequence> |
4141 | + <xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/> |
4142 | + <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/> |
4143 | + </xs:sequence> |
4144 | + </xs:complexType> |
4145 | + <xs:complexType name="BranchData2"> |
4146 | + <xs:sequence> |
4147 | + <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/> |
4148 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
4149 | + <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/> |
4150 | + </xs:sequence> |
4151 | + </xs:complexType> |
4152 | + <xs:complexType name="CashAccount24"> |
4153 | + <xs:sequence> |
4154 | + <xs:element name="Id" type="AccountIdentification4Choice"/> |
4155 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/> |
4156 | + <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/> |
4157 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/> |
4158 | + </xs:sequence> |
4159 | + </xs:complexType> |
4160 | + <xs:complexType name="CashAccountType2Choice"> |
4161 | + <xs:sequence> |
4162 | + <xs:choice> |
4163 | + <xs:element name="Cd" type="ExternalCashAccountType1Code"/> |
4164 | + <xs:element name="Prtry" type="Max35Text"/> |
4165 | + </xs:choice> |
4166 | + </xs:sequence> |
4167 | + </xs:complexType> |
4168 | + <xs:complexType name="CategoryPurpose1Choice"> |
4169 | + <xs:sequence> |
4170 | + <xs:choice> |
4171 | + <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/> |
4172 | + <xs:element name="Prtry" type="Max35Text"/> |
4173 | + </xs:choice> |
4174 | + </xs:sequence> |
4175 | + </xs:complexType> |
4176 | + <xs:simpleType name="ChargeBearerType1Code"> |
4177 | + <xs:restriction base="xs:string"> |
4178 | + <xs:enumeration value="DEBT"/> |
4179 | + <xs:enumeration value="CRED"/> |
4180 | + <xs:enumeration value="SHAR"/> |
4181 | + <xs:enumeration value="SLEV"/> |
4182 | + </xs:restriction> |
4183 | + </xs:simpleType> |
4184 | + <xs:complexType name="ClearingSystemIdentification2Choice"> |
4185 | + <xs:sequence> |
4186 | + <xs:choice> |
4187 | + <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/> |
4188 | + <xs:element name="Prtry" type="Max35Text"/> |
4189 | + </xs:choice> |
4190 | + </xs:sequence> |
4191 | + </xs:complexType> |
4192 | + <xs:complexType name="ClearingSystemMemberIdentification2"> |
4193 | + <xs:sequence> |
4194 | + <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/> |
4195 | + <xs:element name="MmbId" type="Max35Text"/> |
4196 | + </xs:sequence> |
4197 | + </xs:complexType> |
4198 | + <xs:complexType name="ContactDetails2"> |
4199 | + <xs:sequence> |
4200 | + <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/> |
4201 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
4202 | + <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/> |
4203 | + <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/> |
4204 | + <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/> |
4205 | + <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/> |
4206 | + <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/> |
4207 | + </xs:sequence> |
4208 | + </xs:complexType> |
4209 | + <xs:simpleType name="CountryCode"> |
4210 | + <xs:restriction base="xs:string"> |
4211 | + <xs:pattern value="[A-Z]{2,2}"/> |
4212 | + </xs:restriction> |
4213 | + </xs:simpleType> |
4214 | + <xs:simpleType name="CreditDebitCode"> |
4215 | + <xs:restriction base="xs:string"> |
4216 | + <xs:enumeration value="CRDT"/> |
4217 | + <xs:enumeration value="DBIT"/> |
4218 | + </xs:restriction> |
4219 | + </xs:simpleType> |
4220 | + <xs:complexType name="CreditorReferenceInformation2"> |
4221 | + <xs:sequence> |
4222 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/> |
4223 | + <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/> |
4224 | + </xs:sequence> |
4225 | + </xs:complexType> |
4226 | + <xs:complexType name="CreditorReferenceType1Choice"> |
4227 | + <xs:sequence> |
4228 | + <xs:choice> |
4229 | + <xs:element name="Cd" type="DocumentType3Code"/> |
4230 | + <xs:element name="Prtry" type="Max35Text"/> |
4231 | + </xs:choice> |
4232 | + </xs:sequence> |
4233 | + </xs:complexType> |
4234 | + <xs:complexType name="CreditorReferenceType2"> |
4235 | + <xs:sequence> |
4236 | + <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/> |
4237 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
4238 | + </xs:sequence> |
4239 | + </xs:complexType> |
4240 | + <xs:complexType name="CustomerDirectDebitInitiationV03"> |
4241 | + <xs:sequence> |
4242 | + <xs:element name="GrpHdr" type="GroupHeader55"/> |
4243 | + <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstruction7"/> |
4244 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/> |
4245 | + </xs:sequence> |
4246 | + </xs:complexType> |
4247 | + <xs:complexType name="DateAndPlaceOfBirth"> |
4248 | + <xs:sequence> |
4249 | + <xs:element name="BirthDt" type="ISODate"/> |
4250 | + <xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/> |
4251 | + <xs:element name="CityOfBirth" type="Max35Text"/> |
4252 | + <xs:element name="CtryOfBirth" type="CountryCode"/> |
4253 | + </xs:sequence> |
4254 | + </xs:complexType> |
4255 | + <xs:complexType name="DatePeriodDetails"> |
4256 | + <xs:sequence> |
4257 | + <xs:element name="FrDt" type="ISODate"/> |
4258 | + <xs:element name="ToDt" type="ISODate"/> |
4259 | + </xs:sequence> |
4260 | + </xs:complexType> |
4261 | + <xs:simpleType name="DecimalNumber"> |
4262 | + <xs:restriction base="xs:decimal"> |
4263 | + <xs:fractionDigits value="17"/> |
4264 | + <xs:totalDigits value="18"/> |
4265 | + </xs:restriction> |
4266 | + </xs:simpleType> |
4267 | + <xs:complexType name="DirectDebitTransaction7"> |
4268 | + <xs:sequence> |
4269 | + <xs:element maxOccurs="1" minOccurs="0" name="MndtRltdInf" type="MandateRelatedInformation8"/> |
4270 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification43"/> |
4271 | + <xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnId" type="Max35Text"/> |
4272 | + <xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnDt" type="ISODate"/> |
4273 | + </xs:sequence> |
4274 | + </xs:complexType> |
4275 | + <xs:complexType name="DirectDebitTransactionInformation11"> |
4276 | + <xs:sequence> |
4277 | + <xs:element name="PmtId" type="PaymentIdentification1"/> |
4278 | + <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation24"/> |
4279 | + <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4280 | + <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/> |
4281 | + <xs:element maxOccurs="1" minOccurs="0" name="DrctDbtTx" type="DirectDebitTransaction7"/> |
4282 | + <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/> |
4283 | + <xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/> |
4284 | + <xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/> |
4285 | + <xs:element name="Dbtr" type="PartyIdentification43"/> |
4286 | + <xs:element name="DbtrAcct" type="CashAccount24"/> |
4287 | + <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/> |
4288 | + <xs:element maxOccurs="1" minOccurs="0" name="InstrForCdtrAgt" type="Max140Text"/> |
4289 | + <xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/> |
4290 | + <xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/> |
4291 | + <xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/> |
4292 | + <xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/> |
4293 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation7"/> |
4294 | + </xs:sequence> |
4295 | + </xs:complexType> |
4296 | + <xs:complexType name="DiscountAmountAndType1"> |
4297 | + <xs:sequence> |
4298 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/> |
4299 | + <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4300 | + </xs:sequence> |
4301 | + </xs:complexType> |
4302 | + <xs:complexType name="DiscountAmountType1Choice"> |
4303 | + <xs:sequence> |
4304 | + <xs:choice> |
4305 | + <xs:element name="Cd" type="ExternalDiscountAmountType1Code"/> |
4306 | + <xs:element name="Prtry" type="Max35Text"/> |
4307 | + </xs:choice> |
4308 | + </xs:sequence> |
4309 | + </xs:complexType> |
4310 | + <xs:complexType name="Document"> |
4311 | + <xs:sequence> |
4312 | + <xs:element name="CstmrDrctDbtInitn" type="CustomerDirectDebitInitiationV03"/> |
4313 | + </xs:sequence> |
4314 | + </xs:complexType> |
4315 | + <xs:complexType name="DocumentAdjustment1"> |
4316 | + <xs:sequence> |
4317 | + <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4318 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/> |
4319 | + <xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/> |
4320 | + <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/> |
4321 | + </xs:sequence> |
4322 | + </xs:complexType> |
4323 | + <xs:simpleType name="DocumentType3Code"> |
4324 | + <xs:restriction base="xs:string"> |
4325 | + <xs:enumeration value="RADM"/> |
4326 | + <xs:enumeration value="RPIN"/> |
4327 | + <xs:enumeration value="FXDR"/> |
4328 | + <xs:enumeration value="DISP"/> |
4329 | + <xs:enumeration value="PUOR"/> |
4330 | + <xs:enumeration value="SCOR"/> |
4331 | + </xs:restriction> |
4332 | + </xs:simpleType> |
4333 | + <xs:simpleType name="DocumentType5Code"> |
4334 | + <xs:restriction base="xs:string"> |
4335 | + <xs:enumeration value="MSIN"/> |
4336 | + <xs:enumeration value="CNFA"/> |
4337 | + <xs:enumeration value="DNFA"/> |
4338 | + <xs:enumeration value="CINV"/> |
4339 | + <xs:enumeration value="CREN"/> |
4340 | + <xs:enumeration value="DEBN"/> |
4341 | + <xs:enumeration value="HIRI"/> |
4342 | + <xs:enumeration value="SBIN"/> |
4343 | + <xs:enumeration value="CMCN"/> |
4344 | + <xs:enumeration value="SOAC"/> |
4345 | + <xs:enumeration value="DISP"/> |
4346 | + <xs:enumeration value="BOLD"/> |
4347 | + <xs:enumeration value="VCHR"/> |
4348 | + <xs:enumeration value="AROI"/> |
4349 | + <xs:enumeration value="TSUT"/> |
4350 | + </xs:restriction> |
4351 | + </xs:simpleType> |
4352 | + <xs:simpleType name="ExternalAccountIdentification1Code"> |
4353 | + <xs:restriction base="xs:string"> |
4354 | + <xs:minLength value="1"/> |
4355 | + <xs:maxLength value="4"/> |
4356 | + </xs:restriction> |
4357 | + </xs:simpleType> |
4358 | + <xs:simpleType name="ExternalCashAccountType1Code"> |
4359 | + <xs:restriction base="xs:string"> |
4360 | + <xs:minLength value="1"/> |
4361 | + <xs:maxLength value="4"/> |
4362 | + </xs:restriction> |
4363 | + </xs:simpleType> |
4364 | + <xs:simpleType name="ExternalCategoryPurpose1Code"> |
4365 | + <xs:restriction base="xs:string"> |
4366 | + <xs:minLength value="1"/> |
4367 | + <xs:maxLength value="4"/> |
4368 | + </xs:restriction> |
4369 | + </xs:simpleType> |
4370 | + <xs:simpleType name="ExternalClearingSystemIdentification1Code"> |
4371 | + <xs:restriction base="xs:string"> |
4372 | + <xs:minLength value="1"/> |
4373 | + <xs:maxLength value="5"/> |
4374 | + </xs:restriction> |
4375 | + </xs:simpleType> |
4376 | + <xs:simpleType name="ExternalDiscountAmountType1Code"> |
4377 | + <xs:restriction base="xs:string"> |
4378 | + <xs:minLength value="1"/> |
4379 | + <xs:maxLength value="4"/> |
4380 | + </xs:restriction> |
4381 | + </xs:simpleType> |
4382 | + <xs:simpleType name="ExternalFinancialInstitutionIdentification1Code"> |
4383 | + <xs:restriction base="xs:string"> |
4384 | + <xs:minLength value="1"/> |
4385 | + <xs:maxLength value="4"/> |
4386 | + </xs:restriction> |
4387 | + </xs:simpleType> |
4388 | + <xs:simpleType name="ExternalLocalInstrument1Code"> |
4389 | + <xs:restriction base="xs:string"> |
4390 | + <xs:minLength value="1"/> |
4391 | + <xs:maxLength value="35"/> |
4392 | + </xs:restriction> |
4393 | + </xs:simpleType> |
4394 | + <xs:simpleType name="ExternalOrganisationIdentification1Code"> |
4395 | + <xs:restriction base="xs:string"> |
4396 | + <xs:minLength value="1"/> |
4397 | + <xs:maxLength value="4"/> |
4398 | + </xs:restriction> |
4399 | + </xs:simpleType> |
4400 | + <xs:simpleType name="ExternalPersonIdentification1Code"> |
4401 | + <xs:restriction base="xs:string"> |
4402 | + <xs:minLength value="1"/> |
4403 | + <xs:maxLength value="4"/> |
4404 | + </xs:restriction> |
4405 | + </xs:simpleType> |
4406 | + <xs:simpleType name="ExternalPurpose1Code"> |
4407 | + <xs:restriction base="xs:string"> |
4408 | + <xs:minLength value="1"/> |
4409 | + <xs:maxLength value="4"/> |
4410 | + </xs:restriction> |
4411 | + </xs:simpleType> |
4412 | + <xs:simpleType name="ExternalServiceLevel1Code"> |
4413 | + <xs:restriction base="xs:string"> |
4414 | + <xs:minLength value="1"/> |
4415 | + <xs:maxLength value="4"/> |
4416 | + </xs:restriction> |
4417 | + </xs:simpleType> |
4418 | + <xs:simpleType name="ExternalTaxAmountType1Code"> |
4419 | + <xs:restriction base="xs:string"> |
4420 | + <xs:minLength value="1"/> |
4421 | + <xs:maxLength value="4"/> |
4422 | + </xs:restriction> |
4423 | + </xs:simpleType> |
4424 | + <xs:complexType name="FinancialIdentificationSchemeName1Choice"> |
4425 | + <xs:sequence> |
4426 | + <xs:choice> |
4427 | + <xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/> |
4428 | + <xs:element name="Prtry" type="Max35Text"/> |
4429 | + </xs:choice> |
4430 | + </xs:sequence> |
4431 | + </xs:complexType> |
4432 | + <xs:complexType name="FinancialInstitutionIdentification8"> |
4433 | + <xs:sequence> |
4434 | + <xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/> |
4435 | + <xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/> |
4436 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
4437 | + <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/> |
4438 | + <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/> |
4439 | + </xs:sequence> |
4440 | + </xs:complexType> |
4441 | + <xs:simpleType name="Frequency6Code"> |
4442 | + <xs:restriction base="xs:string"> |
4443 | + <xs:enumeration value="YEAR"/> |
4444 | + <xs:enumeration value="MNTH"/> |
4445 | + <xs:enumeration value="QURT"/> |
4446 | + <xs:enumeration value="MIAN"/> |
4447 | + <xs:enumeration value="WEEK"/> |
4448 | + <xs:enumeration value="DAIL"/> |
4449 | + <xs:enumeration value="ADHO"/> |
4450 | + <xs:enumeration value="INDA"/> |
4451 | + <xs:enumeration value="FRTN"/> |
4452 | + </xs:restriction> |
4453 | + </xs:simpleType> |
4454 | + <xs:complexType name="GenericAccountIdentification1"> |
4455 | + <xs:sequence> |
4456 | + <xs:element name="Id" type="Max34Text"/> |
4457 | + <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/> |
4458 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
4459 | + </xs:sequence> |
4460 | + </xs:complexType> |
4461 | + <xs:complexType name="GenericFinancialIdentification1"> |
4462 | + <xs:sequence> |
4463 | + <xs:element name="Id" type="Max35Text"/> |
4464 | + <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/> |
4465 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
4466 | + </xs:sequence> |
4467 | + </xs:complexType> |
4468 | + <xs:complexType name="GenericOrganisationIdentification1"> |
4469 | + <xs:sequence> |
4470 | + <xs:element name="Id" type="Max35Text"/> |
4471 | + <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/> |
4472 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
4473 | + </xs:sequence> |
4474 | + </xs:complexType> |
4475 | + <xs:complexType name="GenericPersonIdentification1"> |
4476 | + <xs:sequence> |
4477 | + <xs:element name="Id" type="Max35Text"/> |
4478 | + <xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/> |
4479 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
4480 | + </xs:sequence> |
4481 | + </xs:complexType> |
4482 | + <xs:complexType name="GroupHeader55"> |
4483 | + <xs:sequence> |
4484 | + <xs:element name="MsgId" type="Max35Text"/> |
4485 | + <xs:element name="CreDtTm" type="ISODateTime"/> |
4486 | + <xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/> |
4487 | + <xs:element name="NbOfTxs" type="Max15NumericText"/> |
4488 | + <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/> |
4489 | + <xs:element name="InitgPty" type="PartyIdentification43"/> |
4490 | + <xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification5"/> |
4491 | + </xs:sequence> |
4492 | + </xs:complexType> |
4493 | + <xs:simpleType name="IBAN2007Identifier"> |
4494 | + <xs:restriction base="xs:string"> |
4495 | + <xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/> |
4496 | + </xs:restriction> |
4497 | + </xs:simpleType> |
4498 | + <xs:simpleType name="ISODate"> |
4499 | + <xs:restriction base="xs:date"/> |
4500 | + </xs:simpleType> |
4501 | + <xs:simpleType name="ISODateTime"> |
4502 | + <xs:restriction base="xs:dateTime"/> |
4503 | + </xs:simpleType> |
4504 | + <xs:complexType name="LocalInstrument2Choice"> |
4505 | + <xs:sequence> |
4506 | + <xs:choice> |
4507 | + <xs:element name="Cd" type="ExternalLocalInstrument1Code"/> |
4508 | + <xs:element name="Prtry" type="Max35Text"/> |
4509 | + </xs:choice> |
4510 | + </xs:sequence> |
4511 | + </xs:complexType> |
4512 | + <xs:complexType name="MandateRelatedInformation8"> |
4513 | + <xs:sequence> |
4514 | + <xs:element maxOccurs="1" minOccurs="0" name="MndtId" type="Max35Text"/> |
4515 | + <xs:element maxOccurs="1" minOccurs="0" name="DtOfSgntr" type="ISODate"/> |
4516 | + <xs:element maxOccurs="1" minOccurs="0" name="AmdmntInd" type="TrueFalseIndicator"/> |
4517 | + <xs:element maxOccurs="1" minOccurs="0" name="AmdmntInfDtls" type="AmendmentInformationDetails8"/> |
4518 | + <xs:element maxOccurs="1" minOccurs="0" name="ElctrncSgntr" type="Max1025Text"/> |
4519 | + <xs:element maxOccurs="1" minOccurs="0" name="FrstColltnDt" type="ISODate"/> |
4520 | + <xs:element maxOccurs="1" minOccurs="0" name="FnlColltnDt" type="ISODate"/> |
4521 | + <xs:element maxOccurs="1" minOccurs="0" name="Frqcy" type="Frequency6Code"/> |
4522 | + </xs:sequence> |
4523 | + </xs:complexType> |
4524 | + <xs:simpleType name="Max1025Text"> |
4525 | + <xs:restriction base="xs:string"> |
4526 | + <xs:minLength value="1"/> |
4527 | + <xs:maxLength value="1025"/> |
4528 | + </xs:restriction> |
4529 | + </xs:simpleType> |
4530 | + <xs:simpleType name="Max10Text"> |
4531 | + <xs:restriction base="xs:string"> |
4532 | + <xs:minLength value="1"/> |
4533 | + <xs:maxLength value="10"/> |
4534 | + </xs:restriction> |
4535 | + </xs:simpleType> |
4536 | + <xs:simpleType name="Max128Text"> |
4537 | + <xs:restriction base="xs:string"> |
4538 | + <xs:minLength value="1"/> |
4539 | + <xs:maxLength value="128"/> |
4540 | + </xs:restriction> |
4541 | + </xs:simpleType> |
4542 | + <xs:simpleType name="Max140Text"> |
4543 | + <xs:restriction base="xs:string"> |
4544 | + <xs:minLength value="1"/> |
4545 | + <xs:maxLength value="140"/> |
4546 | + </xs:restriction> |
4547 | + </xs:simpleType> |
4548 | + <xs:simpleType name="Max15NumericText"> |
4549 | + <xs:restriction base="xs:string"> |
4550 | + <xs:pattern value="[0-9]{1,15}"/> |
4551 | + </xs:restriction> |
4552 | + </xs:simpleType> |
4553 | + <xs:simpleType name="Max16Text"> |
4554 | + <xs:restriction base="xs:string"> |
4555 | + <xs:minLength value="1"/> |
4556 | + <xs:maxLength value="16"/> |
4557 | + </xs:restriction> |
4558 | + </xs:simpleType> |
4559 | + <xs:simpleType name="Max2048Text"> |
4560 | + <xs:restriction base="xs:string"> |
4561 | + <xs:minLength value="1"/> |
4562 | + <xs:maxLength value="2048"/> |
4563 | + </xs:restriction> |
4564 | + </xs:simpleType> |
4565 | + <xs:simpleType name="Max34Text"> |
4566 | + <xs:restriction base="xs:string"> |
4567 | + <xs:minLength value="1"/> |
4568 | + <xs:maxLength value="34"/> |
4569 | + </xs:restriction> |
4570 | + </xs:simpleType> |
4571 | + <xs:simpleType name="Max350Text"> |
4572 | + <xs:restriction base="xs:string"> |
4573 | + <xs:minLength value="1"/> |
4574 | + <xs:maxLength value="350"/> |
4575 | + </xs:restriction> |
4576 | + </xs:simpleType> |
4577 | + <xs:simpleType name="Max35Text"> |
4578 | + <xs:restriction base="xs:string"> |
4579 | + <xs:minLength value="1"/> |
4580 | + <xs:maxLength value="35"/> |
4581 | + </xs:restriction> |
4582 | + </xs:simpleType> |
4583 | + <xs:simpleType name="Max4Text"> |
4584 | + <xs:restriction base="xs:string"> |
4585 | + <xs:minLength value="1"/> |
4586 | + <xs:maxLength value="4"/> |
4587 | + </xs:restriction> |
4588 | + </xs:simpleType> |
4589 | + <xs:simpleType name="Max70Text"> |
4590 | + <xs:restriction base="xs:string"> |
4591 | + <xs:minLength value="1"/> |
4592 | + <xs:maxLength value="70"/> |
4593 | + </xs:restriction> |
4594 | + </xs:simpleType> |
4595 | + <xs:complexType name="NameAndAddress10"> |
4596 | + <xs:sequence> |
4597 | + <xs:element name="Nm" type="Max140Text"/> |
4598 | + <xs:element name="Adr" type="PostalAddress6"/> |
4599 | + </xs:sequence> |
4600 | + </xs:complexType> |
4601 | + <xs:simpleType name="NamePrefix1Code"> |
4602 | + <xs:restriction base="xs:string"> |
4603 | + <xs:enumeration value="DOCT"/> |
4604 | + <xs:enumeration value="MIST"/> |
4605 | + <xs:enumeration value="MISS"/> |
4606 | + <xs:enumeration value="MADM"/> |
4607 | + </xs:restriction> |
4608 | + </xs:simpleType> |
4609 | + <xs:simpleType name="Number"> |
4610 | + <xs:restriction base="xs:decimal"> |
4611 | + <xs:fractionDigits value="0"/> |
4612 | + <xs:totalDigits value="18"/> |
4613 | + </xs:restriction> |
4614 | + </xs:simpleType> |
4615 | + <xs:complexType name="OrganisationIdentification8"> |
4616 | + <xs:sequence> |
4617 | + <xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/> |
4618 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/> |
4619 | + </xs:sequence> |
4620 | + </xs:complexType> |
4621 | + <xs:complexType name="OrganisationIdentificationSchemeName1Choice"> |
4622 | + <xs:sequence> |
4623 | + <xs:choice> |
4624 | + <xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/> |
4625 | + <xs:element name="Prtry" type="Max35Text"/> |
4626 | + </xs:choice> |
4627 | + </xs:sequence> |
4628 | + </xs:complexType> |
4629 | + <xs:complexType name="Party11Choice"> |
4630 | + <xs:sequence> |
4631 | + <xs:choice> |
4632 | + <xs:element name="OrgId" type="OrganisationIdentification8"/> |
4633 | + <xs:element name="PrvtId" type="PersonIdentification5"/> |
4634 | + </xs:choice> |
4635 | + </xs:sequence> |
4636 | + </xs:complexType> |
4637 | + <xs:complexType name="PartyIdentification43"> |
4638 | + <xs:sequence> |
4639 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
4640 | + <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/> |
4641 | + <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/> |
4642 | + <xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/> |
4643 | + <xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/> |
4644 | + </xs:sequence> |
4645 | + </xs:complexType> |
4646 | + <xs:complexType name="PaymentIdentification1"> |
4647 | + <xs:sequence> |
4648 | + <xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/> |
4649 | + <xs:element name="EndToEndId" type="Max35Text"/> |
4650 | + </xs:sequence> |
4651 | + </xs:complexType> |
4652 | + <xs:complexType name="PaymentInstruction7"> |
4653 | + <xs:sequence> |
4654 | + <xs:element name="PmtInfId" type="Max35Text"/> |
4655 | + <xs:element name="PmtMtd" type="PaymentMethod2Code"/> |
4656 | + <xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/> |
4657 | + <xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/> |
4658 | + <xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/> |
4659 | + <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation24"/> |
4660 | + <xs:element name="ReqdColltnDt" type="ISODate"/> |
4661 | + <xs:element name="Cdtr" type="PartyIdentification43"/> |
4662 | + <xs:element name="CdtrAcct" type="CashAccount24"/> |
4663 | + <xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/> |
4664 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/> |
4665 | + <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/> |
4666 | + <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/> |
4667 | + <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount24"/> |
4668 | + <xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification5"/> |
4669 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification43"/> |
4670 | + <xs:element maxOccurs="unbounded" minOccurs="1" name="DrctDbtTxInf" type="DirectDebitTransactionInformation11"/> |
4671 | + </xs:sequence> |
4672 | + </xs:complexType> |
4673 | + <xs:simpleType name="PaymentMethod2Code"> |
4674 | + <xs:restriction base="xs:string"> |
4675 | + <xs:enumeration value="DD"/> |
4676 | + </xs:restriction> |
4677 | + </xs:simpleType> |
4678 | + <xs:complexType name="PaymentTypeInformation24"> |
4679 | + <xs:sequence> |
4680 | + <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/> |
4681 | + <xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/> |
4682 | + <xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/> |
4683 | + <xs:element maxOccurs="1" minOccurs="0" name="SeqTp" type="SequenceType3Code"/> |
4684 | + <xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/> |
4685 | + </xs:sequence> |
4686 | + </xs:complexType> |
4687 | + <xs:simpleType name="PercentageRate"> |
4688 | + <xs:restriction base="xs:decimal"> |
4689 | + <xs:fractionDigits value="10"/> |
4690 | + <xs:totalDigits value="11"/> |
4691 | + </xs:restriction> |
4692 | + </xs:simpleType> |
4693 | + <xs:complexType name="PersonIdentification5"> |
4694 | + <xs:sequence> |
4695 | + <xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/> |
4696 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/> |
4697 | + </xs:sequence> |
4698 | + </xs:complexType> |
4699 | + <xs:complexType name="PersonIdentificationSchemeName1Choice"> |
4700 | + <xs:sequence> |
4701 | + <xs:choice> |
4702 | + <xs:element name="Cd" type="ExternalPersonIdentification1Code"/> |
4703 | + <xs:element name="Prtry" type="Max35Text"/> |
4704 | + </xs:choice> |
4705 | + </xs:sequence> |
4706 | + </xs:complexType> |
4707 | + <xs:simpleType name="PhoneNumber"> |
4708 | + <xs:restriction base="xs:string"> |
4709 | + <xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/> |
4710 | + </xs:restriction> |
4711 | + </xs:simpleType> |
4712 | + <xs:complexType name="PostalAddress6"> |
4713 | + <xs:sequence> |
4714 | + <xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/> |
4715 | + <xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/> |
4716 | + <xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/> |
4717 | + <xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/> |
4718 | + <xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/> |
4719 | + <xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/> |
4720 | + <xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/> |
4721 | + <xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/> |
4722 | + <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/> |
4723 | + <xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/> |
4724 | + </xs:sequence> |
4725 | + </xs:complexType> |
4726 | + <xs:simpleType name="Priority2Code"> |
4727 | + <xs:restriction base="xs:string"> |
4728 | + <xs:enumeration value="HIGH"/> |
4729 | + <xs:enumeration value="NORM"/> |
4730 | + </xs:restriction> |
4731 | + </xs:simpleType> |
4732 | + <xs:complexType name="Purpose2Choice"> |
4733 | + <xs:sequence> |
4734 | + <xs:choice> |
4735 | + <xs:element name="Cd" type="ExternalPurpose1Code"/> |
4736 | + <xs:element name="Prtry" type="Max35Text"/> |
4737 | + </xs:choice> |
4738 | + </xs:sequence> |
4739 | + </xs:complexType> |
4740 | + <xs:complexType name="ReferredDocumentInformation3"> |
4741 | + <xs:sequence> |
4742 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/> |
4743 | + <xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/> |
4744 | + <xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/> |
4745 | + </xs:sequence> |
4746 | + </xs:complexType> |
4747 | + <xs:complexType name="ReferredDocumentType1Choice"> |
4748 | + <xs:sequence> |
4749 | + <xs:choice> |
4750 | + <xs:element name="Cd" type="DocumentType5Code"/> |
4751 | + <xs:element name="Prtry" type="Max35Text"/> |
4752 | + </xs:choice> |
4753 | + </xs:sequence> |
4754 | + </xs:complexType> |
4755 | + <xs:complexType name="ReferredDocumentType2"> |
4756 | + <xs:sequence> |
4757 | + <xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/> |
4758 | + <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/> |
4759 | + </xs:sequence> |
4760 | + </xs:complexType> |
4761 | + <xs:complexType name="RegulatoryAuthority2"> |
4762 | + <xs:sequence> |
4763 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
4764 | + <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/> |
4765 | + </xs:sequence> |
4766 | + </xs:complexType> |
4767 | + <xs:complexType name="RegulatoryReporting3"> |
4768 | + <xs:sequence> |
4769 | + <xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/> |
4770 | + <xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/> |
4771 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/> |
4772 | + </xs:sequence> |
4773 | + </xs:complexType> |
4774 | + <xs:simpleType name="RegulatoryReportingType1Code"> |
4775 | + <xs:restriction base="xs:string"> |
4776 | + <xs:enumeration value="CRED"/> |
4777 | + <xs:enumeration value="DEBT"/> |
4778 | + <xs:enumeration value="BOTH"/> |
4779 | + </xs:restriction> |
4780 | + </xs:simpleType> |
4781 | + <xs:complexType name="RemittanceAmount2"> |
4782 | + <xs:sequence> |
4783 | + <xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4784 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/> |
4785 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4786 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/> |
4787 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/> |
4788 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4789 | + </xs:sequence> |
4790 | + </xs:complexType> |
4791 | + <xs:complexType name="RemittanceInformation7"> |
4792 | + <xs:sequence> |
4793 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/> |
4794 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation9"/> |
4795 | + </xs:sequence> |
4796 | + </xs:complexType> |
4797 | + <xs:complexType name="RemittanceLocation2"> |
4798 | + <xs:sequence> |
4799 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/> |
4800 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/> |
4801 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/> |
4802 | + <xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/> |
4803 | + </xs:sequence> |
4804 | + </xs:complexType> |
4805 | + <xs:simpleType name="RemittanceLocationMethod2Code"> |
4806 | + <xs:restriction base="xs:string"> |
4807 | + <xs:enumeration value="FAXI"/> |
4808 | + <xs:enumeration value="EDIC"/> |
4809 | + <xs:enumeration value="URID"/> |
4810 | + <xs:enumeration value="EMAL"/> |
4811 | + <xs:enumeration value="POST"/> |
4812 | + <xs:enumeration value="SMSM"/> |
4813 | + </xs:restriction> |
4814 | + </xs:simpleType> |
4815 | + <xs:simpleType name="SequenceType3Code"> |
4816 | + <xs:restriction base="xs:string"> |
4817 | + <xs:enumeration value="FRST"/> |
4818 | + <xs:enumeration value="RCUR"/> |
4819 | + <xs:enumeration value="FNAL"/> |
4820 | + <xs:enumeration value="OOFF"/> |
4821 | + <xs:enumeration value="RPRE"/> |
4822 | + </xs:restriction> |
4823 | + </xs:simpleType> |
4824 | + <xs:complexType name="ServiceLevel8Choice"> |
4825 | + <xs:sequence> |
4826 | + <xs:choice> |
4827 | + <xs:element name="Cd" type="ExternalServiceLevel1Code"/> |
4828 | + <xs:element name="Prtry" type="Max35Text"/> |
4829 | + </xs:choice> |
4830 | + </xs:sequence> |
4831 | + </xs:complexType> |
4832 | + <xs:complexType name="StructuredRegulatoryReporting3"> |
4833 | + <xs:sequence> |
4834 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/> |
4835 | + <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/> |
4836 | + <xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/> |
4837 | + <xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/> |
4838 | + <xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4839 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/> |
4840 | + </xs:sequence> |
4841 | + </xs:complexType> |
4842 | + <xs:complexType name="StructuredRemittanceInformation9"> |
4843 | + <xs:sequence> |
4844 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/> |
4845 | + <xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/> |
4846 | + <xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/> |
4847 | + <xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/> |
4848 | + <xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/> |
4849 | + <xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/> |
4850 | + </xs:sequence> |
4851 | + </xs:complexType> |
4852 | + <xs:complexType name="SupplementaryData1"> |
4853 | + <xs:sequence> |
4854 | + <xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/> |
4855 | + <xs:element name="Envlp" type="SupplementaryDataEnvelope1"/> |
4856 | + </xs:sequence> |
4857 | + </xs:complexType> |
4858 | + <xs:complexType name="SupplementaryDataEnvelope1"> |
4859 | + <xs:sequence> |
4860 | + <xs:any namespace="##any" processContents="lax"/> |
4861 | + </xs:sequence> |
4862 | + </xs:complexType> |
4863 | + <xs:complexType name="TaxAmount1"> |
4864 | + <xs:sequence> |
4865 | + <xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/> |
4866 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4867 | + <xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4868 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/> |
4869 | + </xs:sequence> |
4870 | + </xs:complexType> |
4871 | + <xs:complexType name="TaxAmountAndType1"> |
4872 | + <xs:sequence> |
4873 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/> |
4874 | + <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4875 | + </xs:sequence> |
4876 | + </xs:complexType> |
4877 | + <xs:complexType name="TaxAmountType1Choice"> |
4878 | + <xs:sequence> |
4879 | + <xs:choice> |
4880 | + <xs:element name="Cd" type="ExternalTaxAmountType1Code"/> |
4881 | + <xs:element name="Prtry" type="Max35Text"/> |
4882 | + </xs:choice> |
4883 | + </xs:sequence> |
4884 | + </xs:complexType> |
4885 | + <xs:complexType name="TaxAuthorisation1"> |
4886 | + <xs:sequence> |
4887 | + <xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/> |
4888 | + <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/> |
4889 | + </xs:sequence> |
4890 | + </xs:complexType> |
4891 | + <xs:complexType name="TaxInformation3"> |
4892 | + <xs:sequence> |
4893 | + <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/> |
4894 | + <xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/> |
4895 | + <xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/> |
4896 | + <xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/> |
4897 | + <xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/> |
4898 | + <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4899 | + <xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4900 | + <xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/> |
4901 | + <xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/> |
4902 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/> |
4903 | + </xs:sequence> |
4904 | + </xs:complexType> |
4905 | + <xs:complexType name="TaxParty1"> |
4906 | + <xs:sequence> |
4907 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/> |
4908 | + <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/> |
4909 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/> |
4910 | + </xs:sequence> |
4911 | + </xs:complexType> |
4912 | + <xs:complexType name="TaxParty2"> |
4913 | + <xs:sequence> |
4914 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/> |
4915 | + <xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/> |
4916 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/> |
4917 | + <xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/> |
4918 | + </xs:sequence> |
4919 | + </xs:complexType> |
4920 | + <xs:complexType name="TaxPeriod1"> |
4921 | + <xs:sequence> |
4922 | + <xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/> |
4923 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/> |
4924 | + <xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/> |
4925 | + </xs:sequence> |
4926 | + </xs:complexType> |
4927 | + <xs:complexType name="TaxRecord1"> |
4928 | + <xs:sequence> |
4929 | + <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/> |
4930 | + <xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/> |
4931 | + <xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/> |
4932 | + <xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/> |
4933 | + <xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/> |
4934 | + <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/> |
4935 | + <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/> |
4936 | + <xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/> |
4937 | + <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/> |
4938 | + </xs:sequence> |
4939 | + </xs:complexType> |
4940 | + <xs:complexType name="TaxRecordDetails1"> |
4941 | + <xs:sequence> |
4942 | + <xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/> |
4943 | + <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/> |
4944 | + </xs:sequence> |
4945 | + </xs:complexType> |
4946 | + <xs:simpleType name="TaxRecordPeriod1Code"> |
4947 | + <xs:restriction base="xs:string"> |
4948 | + <xs:enumeration value="MM01"/> |
4949 | + <xs:enumeration value="MM02"/> |
4950 | + <xs:enumeration value="MM03"/> |
4951 | + <xs:enumeration value="MM04"/> |
4952 | + <xs:enumeration value="MM05"/> |
4953 | + <xs:enumeration value="MM06"/> |
4954 | + <xs:enumeration value="MM07"/> |
4955 | + <xs:enumeration value="MM08"/> |
4956 | + <xs:enumeration value="MM09"/> |
4957 | + <xs:enumeration value="MM10"/> |
4958 | + <xs:enumeration value="MM11"/> |
4959 | + <xs:enumeration value="MM12"/> |
4960 | + <xs:enumeration value="QTR1"/> |
4961 | + <xs:enumeration value="QTR2"/> |
4962 | + <xs:enumeration value="QTR3"/> |
4963 | + <xs:enumeration value="QTR4"/> |
4964 | + <xs:enumeration value="HLF1"/> |
4965 | + <xs:enumeration value="HLF2"/> |
4966 | + </xs:restriction> |
4967 | + </xs:simpleType> |
4968 | + <xs:simpleType name="TrueFalseIndicator"> |
4969 | + <xs:restriction base="xs:boolean"/> |
4970 | + </xs:simpleType> |
4971 | +</xs:schema> |
4972 | \ No newline at end of file |
4973 | |
4974 | === added file 'account_banking_sepa_direct_debit/data/pain.008.001.04.xsd' |
4975 | --- account_banking_sepa_direct_debit/data/pain.008.001.04.xsd 1970-01-01 00:00:00 +0000 |
4976 | +++ account_banking_sepa_direct_debit/data/pain.008.001.04.xsd 2014-01-13 12:42:46 +0000 |
4977 | @@ -0,0 +1,892 @@ |
4978 | +<?xml version="1.0" encoding="UTF-8"?> |
4979 | +<!--Generated by Standards Editor (build:R1.0.41.3) on 2013 Mar 05 13:39:40, ISO 20022 version : 2013--> |
4980 | +<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.04" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.008.001.04"> |
4981 | + <xs:element name="Document" type="Document"/> |
4982 | + <xs:complexType name="AccountIdentification4Choice"> |
4983 | + <xs:choice> |
4984 | + <xs:element name="IBAN" type="IBAN2007Identifier"/> |
4985 | + <xs:element name="Othr" type="GenericAccountIdentification1"/> |
4986 | + </xs:choice> |
4987 | + </xs:complexType> |
4988 | + <xs:complexType name="AccountSchemeName1Choice"> |
4989 | + <xs:choice> |
4990 | + <xs:element name="Cd" type="ExternalAccountIdentification1Code"/> |
4991 | + <xs:element name="Prtry" type="Max35Text"/> |
4992 | + </xs:choice> |
4993 | + </xs:complexType> |
4994 | + <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType"> |
4995 | + <xs:restriction base="xs:decimal"> |
4996 | + <xs:fractionDigits value="5"/> |
4997 | + <xs:totalDigits value="18"/> |
4998 | + <xs:minInclusive value="0"/> |
4999 | + </xs:restriction> |
5000 | + </xs:simpleType> |
One small note for the PEP8 fundamentalists : the 3 modules account_ banking_ pain_base, account_ banking_ sepa_credit_ transfer and account_ banking_ sepa_direct_ debit are fully PEP8 compliant, so you won't be able to block this merge proposal for such a stupid reason :)