Merge lp:~acysos-team/account-payment/account-payment-sepa-7.0 into lp:~account-payment-team/account-payment/7.0

Proposed by Ignacio Ibeas (www.acysos.com) on 2014-01-25
Status: Needs review
Proposed branch: lp:~acysos-team/account-payment/account-payment-sepa-7.0
Merge into: lp:~account-payment-team/account-payment/7.0
Diff against target: 15311 lines (+14838/-0)
87 files modified
account_payment_direct_debit/__init__.py (+1/-0)
account_payment_direct_debit/__openerp__.py (+56/-0)
account_payment_direct_debit/data/account_payment_term.xml (+16/-0)
account_payment_direct_debit/i18n/account_direct_debit.pot (+133/-0)
account_payment_direct_debit/i18n/es.po (+133/-0)
account_payment_direct_debit/i18n/nl.po (+155/-0)
account_payment_direct_debit/migrations/7.0.2/post-migration.py (+38/-0)
account_payment_direct_debit/migrations/7.0.2/pre-migration.py (+51/-0)
account_payment_direct_debit/model/__init__.py (+6/-0)
account_payment_direct_debit/model/account_invoice.py (+164/-0)
account_payment_direct_debit/model/account_move_line.py (+126/-0)
account_payment_direct_debit/model/account_payment.py (+21/-0)
account_payment_direct_debit/model/payment_line.py (+152/-0)
account_payment_direct_debit/model/payment_order_create.py (+41/-0)
account_payment_direct_debit/model/payment_type.py (+41/-0)
account_payment_direct_debit/view/account_invoice.xml (+41/-0)
account_payment_direct_debit/view/account_payment.xml (+69/-0)
account_payment_direct_debit/view/payment_type.xml (+17/-0)
account_payment_direct_debit/workflow/account_invoice.xml (+51/-0)
account_payment_export/__init__.py (+1/-0)
account_payment_export/__openerp__.py (+62/-0)
account_payment_export/data/payment_type.xml (+14/-0)
account_payment_export/i18n/account_banking_payment_export.pot (+145/-0)
account_payment_export/i18n/es.po (+110/-0)
account_payment_export/i18n/nl.po (+151/-0)
account_payment_export/model/__init__.py (+4/-0)
account_payment_export/model/account_payment.py (+88/-0)
account_payment_export/model/bank_payment_manual.py (+59/-0)
account_payment_export/model/payment_mode.py (+44/-0)
account_payment_export/model/payment_order_create.py (+58/-0)
account_payment_export/view/account_payment.xml (+22/-0)
account_payment_export/view/bank_payment_manual.xml (+18/-0)
account_payment_export/view/payment_mode.xml (+31/-0)
account_payment_pain_base/.directory (+6/-0)
account_payment_pain_base/__init__.py (+26/-0)
account_payment_pain_base/__openerp__.py (+53/-0)
account_payment_pain_base/banking_export_pain.py (+439/-0)
account_payment_pain_base/company.py (+78/-0)
account_payment_pain_base/company_view.xml (+24/-0)
account_payment_pain_base/i18n/account_banking_pain_base.pot (+146/-0)
account_payment_pain_base/i18n/es.po (+153/-0)
account_payment_pain_base/i18n/fr.po (+146/-0)
account_payment_pain_base/payment_line.py (+52/-0)
account_payment_pain_base/payment_line_view.xml (+41/-0)
account_payment_pain_base/payment_mode.py (+39/-0)
account_payment_pain_base/payment_mode_view.xml (+22/-0)
account_payment_sepa_credit_transfer/__init__.py (+24/-0)
account_payment_sepa_credit_transfer/__openerp__.py (+55/-0)
account_payment_sepa_credit_transfer/account_banking_sepa.py (+90/-0)
account_payment_sepa_credit_transfer/account_banking_sepa_view.xml (+80/-0)
account_payment_sepa_credit_transfer/data/pain.001.001.02.xsd (+784/-0)
account_payment_sepa_credit_transfer/data/pain.001.001.03.xsd (+921/-0)
account_payment_sepa_credit_transfer/data/pain.001.001.04.xsd (+968/-0)
account_payment_sepa_credit_transfer/data/pain.001.001.05.xsd (+931/-0)
account_payment_sepa_credit_transfer/data/payment_type_sepa_sct.xml (+41/-0)
account_payment_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot (+207/-0)
account_payment_sepa_credit_transfer/i18n/es.po (+227/-0)
account_payment_sepa_credit_transfer/i18n/fr.po (+207/-0)
account_payment_sepa_credit_transfer/i18n/nl.po (+405/-0)
account_payment_sepa_credit_transfer/security/ir.model.access.csv (+2/-0)
account_payment_sepa_credit_transfer/wizard/__init__.py (+23/-0)
account_payment_sepa_credit_transfer/wizard/export_sepa.py (+299/-0)
account_payment_sepa_credit_transfer/wizard/export_sepa_view.xml (+37/-0)
account_payment_sepa_direct_debit/__init__.py (+25/-0)
account_payment_sepa_direct_debit/__openerp__.py (+63/-0)
account_payment_sepa_direct_debit/account_banking_sdd.py (+424/-0)
account_payment_sepa_direct_debit/account_banking_sdd_view.xml (+80/-0)
account_payment_sepa_direct_debit/account_invoice_view.xml (+22/-0)
account_payment_sepa_direct_debit/account_payment_view.xml (+26/-0)
account_payment_sepa_direct_debit/company.py (+89/-0)
account_payment_sepa_direct_debit/company_view.xml (+23/-0)
account_payment_sepa_direct_debit/data/mandate_reference_sequence.xml (+21/-0)
account_payment_sepa_direct_debit/data/pain.008.001.02.xsd (+879/-0)
account_payment_sepa_direct_debit/data/pain.008.001.03.xsd (+925/-0)
account_payment_sepa_direct_debit/data/pain.008.001.04.xsd (+892/-0)
account_payment_sepa_direct_debit/data/payment_type_sdd.xml (+37/-0)
account_payment_sepa_direct_debit/i18n/account_banking_sepa_direct_debit.pot (+633/-0)
account_payment_sepa_direct_debit/i18n/es.po (+657/-0)
account_payment_sepa_direct_debit/i18n/fr.po (+642/-0)
account_payment_sepa_direct_debit/mandate_expire_cron.xml (+26/-0)
account_payment_sepa_direct_debit/res_partner_bank_view.xml (+48/-0)
account_payment_sepa_direct_debit/sdd_mandate_view.xml (+149/-0)
account_payment_sepa_direct_debit/security/ir.model.access.csv (+4/-0)
account_payment_sepa_direct_debit/security/original_mandate_required_security.xml (+17/-0)
account_payment_sepa_direct_debit/wizard/__init__.py (+23/-0)
account_payment_sepa_direct_debit/wizard/export_sdd.py (+451/-0)
account_payment_sepa_direct_debit/wizard/export_sdd_view.xml (+37/-0)
To merge this branch: bzr merge lp:~acysos-team/account-payment/account-payment-sepa-7.0
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) 2014-01-25 Abstain on 2014-04-04
Review via email: mp+203211@code.launchpad.net

Description of the change

Hello,

This request merge has the SEPA modules of Banking Addons adapted to Account Payment Extension.
There companies that use account payment extension and the can't migrate to Banking Addons.

The original modules are: https://code.launchpad.net/~akretion-team/banking-addons/70-sepa-trf-dd-updates

Greetings

To post a comment you must log in.

Hi,

first of all, I completely understand that you need the exportfunctionality without the account_banking backend.

Having that said, your approach involves a huge duplication of code, which inevitably leads to a duplictation of effort in maintaining this code.

Would it not be possible instead, to refactor acocunt_banking_payment_export so that it can be used without the payment mode type (it seems to me that this is the main change in this proposal), or come to a shared solution between account_banking and account_payment_extension with regards to the functionality that payment.mode.type provides?

Wrt the debit functionality, things are a little more complicated. It seems that you do copy the workflow changes, and even the account_banking interface to trigger the workflow transitions, but these methods are not called anywhere (e.g. debit_storno() in line 979). Can you clarify the use of this?

review: Needs Information

Hello,

The companies that use account_payment_extension user to reconcilie bank_statement.

So, it's true that we can remove debit_storno, becuase it don't use. But I leave it for two reason, one leave the code the most similar possible between this modules and account banking addons. So, If banking addons team make an improve we can apply more quickly and If we make an improve they can apply quickly. I want to reduce the effort in maintining this code.

Also I leave debit_storno because there are other person that are working in the new reconcilie with bank statement, maybe I use it in the future.

Greetings

Thanks for your response with regards to the unused code. Apart from that, I'd still like to know if you think it is feasible to adapt the original payment export module instead of duplicating all this code.

review: Needs Information
108. By Ignacio Ibeas (www.acysos.com) on 2014-01-30

[FIX] account_payment_direct_debit: fix payment_mode_id

Hello,

I have studied the two modules, there are some code that is incompatible because banking-addons people have change the name of some class and views. Some of this class do the same but they change the name and we can't inherit from account_payment_extension.

So, the differences are few, but exists.

Greetings

109. By Ignacio Ibeas (www.acysos.com) on 2014-02-09

[FIX] account_payment_direct_debit: fix name and remove print

Well, if it helps we are open to refactoring. You can propose any changes necessary to the banking-addons project, and create a shared module in one of the projects.

I don't think that is possible to make a module compatible witn account_payment_extenstion and account_banking_payment. Some class are the same but with different name, so we have to change one of the two modules.

In a non-production database it's not a problem but in a production database the data model change and we have to make migration scripts.

I see that this will be a slow progress, so I have publish the sepa modules for account_payment_extension in other project http://launchpad.net/sepa-tools for OpenERP 6.0, 6.1 and 7.0.

Greetings

Too bad. I'll abstain so as not to block this proposal if other people approve.

review: Abstain
Pedro Manuel Baeza (pedro.baeza) wrote :

This project is now hosted on https://github.com/OCA/account-payment. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

Unmerged revisions

109. By Ignacio Ibeas (www.acysos.com) on 2014-02-09

[FIX] account_payment_direct_debit: fix name and remove print

108. By Ignacio Ibeas (www.acysos.com) on 2014-01-30

[FIX] account_payment_direct_debit: fix payment_mode_id

107. By Ignacio Ibeas (www.acysos.com) on 2014-01-25

[ADD] SEPA modules ported from Banking Addons to Account Payment Extension

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'account_payment_direct_debit'
2=== added file 'account_payment_direct_debit/__init__.py'
3--- account_payment_direct_debit/__init__.py 1970-01-01 00:00:00 +0000
4+++ account_payment_direct_debit/__init__.py 2014-02-09 13:36:47 +0000
5@@ -0,0 +1,1 @@
6+import model
7
8=== added file 'account_payment_direct_debit/__openerp__.py'
9--- account_payment_direct_debit/__openerp__.py 1970-01-01 00:00:00 +0000
10+++ account_payment_direct_debit/__openerp__.py 2014-02-09 13:36:47 +0000
11@@ -0,0 +1,56 @@
12+##############################################################################
13+#
14+# Copyright (C) 2011 - 2013 Therp BV (<http://therp.nl>).
15+# Copyright (C) 2011 Smile (<http://smile.fr>).
16+# Copyright (C) 2014 Acysos S.L. (<http://acysos.com>).
17+# @author: Ignacio Ibeas <ignacio@acysos.com>
18+# All Rights Reserved
19+#
20+# This program is free software: you can redistribute it and/or modify
21+# it under the terms of the GNU Affero General Public License as published by
22+# the Free Software Foundation, either version 3 of the License, or
23+# (at your option) any later version.
24+#
25+# This program is distributed in the hope that it will be useful,
26+# but WITHOUT ANY WARRANTY; without even the implied warranty of
27+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+# GNU Affero General Public License for more details.
29+#
30+# You should have received a copy of the GNU Affero General Public License
31+# along with this program. If not, see <http://www.gnu.org/licenses/>.
32+#
33+##############################################################################
34+{
35+ 'name': 'Account Payment Direct Debit',
36+ 'version': '7.0.2.134',
37+ 'license': 'AGPL-3',
38+ 'author': ['Therp BV', 'Smile'],
39+ 'website': 'https://launchpad.net/account-payment',
40+ 'category': 'Banking addons',
41+ 'depends': ['account_payment_extension'],
42+ 'data': [
43+ 'view/account_payment.xml',
44+ 'view/account_invoice.xml',
45+ 'view/payment_type.xml',
46+ 'workflow/account_invoice.xml',
47+ 'data/account_payment_term.xml',
48+ ],
49+ 'description': '''
50+This module adds support for direct debit orders, analogous to payment orders.
51+A new entry in the Accounting/Payment menu allow you to create a direct debit
52+order that helps you to select any customer invoices for you to collect.
53+
54+This module explicitely implements direct debit orders as applicable
55+in the Netherlands. Debit orders are advanced in total by the bank.
56+Amounts that cannot be debited or are canceled by account owners are
57+credited afterwards. Such a creditation is called a storno. This style of
58+direct debit order may not apply to your country.
59+
60+This module depends on and is part of the account payment for OpenERP. This set
61+of modules helps you to provide support for communications with your local
62+banking institutions.
63+
64+Adapted to account_payment_extension by Acysos S.L. <info@acysos.com>
65+ ''',
66+ 'installable': True,
67+}
68
69=== added directory 'account_payment_direct_debit/data'
70=== added file 'account_payment_direct_debit/data/account_payment_term.xml'
71--- account_payment_direct_debit/data/account_payment_term.xml 1970-01-01 00:00:00 +0000
72+++ account_payment_direct_debit/data/account_payment_term.xml 2014-02-09 13:36:47 +0000
73@@ -0,0 +1,16 @@
74+<?xml version="1.0" encoding="utf-8"?>
75+<openerp>
76+ <data noupdate="1">
77+ <record id="payment_term_direct_debit" model="account.payment.term">
78+ <field name="name">Direct debit</field>
79+ <field name="note">Direct debit in 14 days</field>
80+ </record>
81+ <record id="payment_term_line_direct_debit" model="account.payment.term.line">
82+ <field name="name">Direct debit in 14 days</field>
83+ <field name="value">balance</field>
84+ <field eval="14" name="days"/>
85+ <field eval="0" name="days2"/>
86+ <field eval="payment_term_direct_debit" name="payment_id"/>
87+ </record>
88+ </data>
89+</openerp>
90
91=== added directory 'account_payment_direct_debit/i18n'
92=== added file 'account_payment_direct_debit/i18n/account_direct_debit.pot'
93--- account_payment_direct_debit/i18n/account_direct_debit.pot 1970-01-01 00:00:00 +0000
94+++ account_payment_direct_debit/i18n/account_direct_debit.pot 2014-02-09 13:36:47 +0000
95@@ -0,0 +1,133 @@
96+# Translation of OpenERP Server.
97+# This file contains the translation of the following modules:
98+# * account_direct_debit
99+#
100+msgid ""
101+msgstr ""
102+"Project-Id-Version: OpenERP Server 7.0\n"
103+"Report-Msgid-Bugs-To: \n"
104+"POT-Creation-Date: 2013-10-25 16:01+0000\n"
105+"PO-Revision-Date: 2013-10-25 16:01+0000\n"
106+"Last-Translator: <>\n"
107+"Language-Team: \n"
108+"MIME-Version: 1.0\n"
109+"Content-Type: text/plain; charset=UTF-8\n"
110+"Content-Transfer-Encoding: \n"
111+"Plural-Forms: \n"
112+
113+#. module: account_direct_debit
114+#: model:account.payment.term,note:account_direct_debit.payment_term_direct_debit
115+msgid "Direct debit in 14 days"
116+msgstr ""
117+
118+#. module: account_direct_debit
119+#: model:ir.model,name:account_direct_debit.model_payment_order
120+msgid "Payment Order"
121+msgstr ""
122+
123+#. module: account_direct_debit
124+#: view:payment.order:0
125+msgid "Select Invoices to Collect"
126+msgstr ""
127+
128+#. module: account_direct_debit
129+#: model:ir.model,name:account_direct_debit.model_payment_line
130+msgid "Payment Line"
131+msgstr ""
132+
133+#. module: account_direct_debit
134+#: code:addons/account_direct_debit/model/payment_line.py:140
135+#, python-format
136+msgid "Can not reconcile"
137+msgstr ""
138+
139+#. module: account_direct_debit
140+#: view:account.invoice:0
141+msgid "Debit Denied"
142+msgstr ""
143+
144+#. module: account_direct_debit
145+#: code:addons/account_direct_debit/model/account_invoice.py:147
146+#, python-format
147+msgid "Error !"
148+msgstr ""
149+
150+#. module: account_direct_debit
151+#: view:account.invoice:0
152+msgid "Show only invoices with state Debit denied"
153+msgstr ""
154+
155+#. module: account_direct_debit
156+#: view:payment.order:0
157+msgid "{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', 'payment')]}"
158+msgstr ""
159+
160+#. module: account_direct_debit
161+#: model:ir.model,name:account_direct_debit.model_account_move_line
162+msgid "Journal Items"
163+msgstr ""
164+
165+#. module: account_direct_debit
166+#: view:account.invoice:0
167+msgid "Debit denied"
168+msgstr ""
169+
170+#. module: account_direct_debit
171+#: model:ir.actions.act_window,name:account_direct_debit.action_debit_order_tree
172+#: model:ir.ui.menu,name:account_direct_debit.menu_action_debit_order_form
173+msgid "Direct Debit Orders"
174+msgstr ""
175+
176+#. module: account_direct_debit
177+#: model:account.payment.term,name:account_direct_debit.payment_term_direct_debit
178+msgid "Direct debit"
179+msgstr ""
180+
181+#. module: account_direct_debit
182+#: code:addons/account_direct_debit/model/account_invoice.py:148
183+#, python-format
184+msgid "You cannot set invoice '%s' to state 'debit denied', as it is still reconciled."
185+msgstr ""
186+
187+#. module: account_direct_debit
188+#: code:addons/account_direct_debit/model/account_invoice.py:152
189+#, python-format
190+msgid "Invoice '%s': direct debit is denied."
191+msgstr ""
192+
193+#. module: account_direct_debit
194+#: code:addons/account_direct_debit/model/payment_line.py:141
195+#, python-format
196+msgid "Cancelation of payment line '%s' has already been processed"
197+msgstr ""
198+
199+#. module: account_direct_debit
200+#: model:ir.model,name:account_direct_debit.model_payment_order_create
201+msgid "payment.order.create"
202+msgstr ""
203+
204+#. module: account_direct_debit
205+#: field:payment.line,storno:0
206+msgid "Storno"
207+msgstr ""
208+
209+#. module: account_direct_debit
210+#: help:payment.line,storno:0
211+msgid "If this is true, the debit order has been canceled by the bank or by the customer"
212+msgstr ""
213+
214+#. module: account_direct_debit
215+#: model:ir.actions.act_window,help:account_direct_debit.action_debit_order_tree
216+msgid "A debit order is a debit request from your company to collect customer invoices. Here you can register all debit orders that should be done, keep track of all debit orders and mention the invoice reference and the partner the withdrawal should be done for."
217+msgstr ""
218+
219+#. module: account_direct_debit
220+#: field:account.move.line,amount_to_receive:0
221+msgid "Amount to receive"
222+msgstr ""
223+
224+#. module: account_direct_debit
225+#: model:ir.model,name:account_direct_debit.model_account_invoice
226+msgid "Invoice"
227+msgstr ""
228+
229
230=== added file 'account_payment_direct_debit/i18n/es.po'
231--- account_payment_direct_debit/i18n/es.po 1970-01-01 00:00:00 +0000
232+++ account_payment_direct_debit/i18n/es.po 2014-02-09 13:36:47 +0000
233@@ -0,0 +1,133 @@
234+# Translation of OpenERP Server.
235+# This file contains the translation of the following modules:
236+# * account_payment_direct_debit
237+#
238+msgid ""
239+msgstr ""
240+"Project-Id-Version: OpenERP Server 7.0-20131224-002412\n"
241+"Report-Msgid-Bugs-To: \n"
242+"POT-Creation-Date: 2014-01-25 11:27+0000\n"
243+"PO-Revision-Date: 2014-01-25 11:27+0000\n"
244+"Last-Translator: <>\n"
245+"Language-Team: \n"
246+"MIME-Version: 1.0\n"
247+"Content-Type: text/plain; charset=UTF-8\n"
248+"Content-Transfer-Encoding: \n"
249+"Plural-Forms: \n"
250+
251+#. module: account_payment_direct_debit
252+#: model:account.payment.term,note:account_payment_direct_debit.payment_term_direct_debit
253+msgid "Direct debit in 14 days"
254+msgstr "Adeudos directos en 14 días"
255+
256+#. module: account_payment_direct_debit
257+#: model:ir.model,name:account_payment_direct_debit.model_payment_order
258+msgid "Payment Order"
259+msgstr "Orden de pago"
260+
261+#. module: account_payment_direct_debit
262+#: field:payment.type,payment_order_type:0
263+msgid "Payment order type"
264+msgstr "Tipo de orden de pago"
265+
266+#. module: account_payment_direct_debit
267+#: model:ir.model,name:account_payment_direct_debit.model_payment_line
268+msgid "Payment Line"
269+msgstr "Línea de pago"
270+
271+#. module: account_payment_direct_debit
272+#: model:ir.model,name:account_payment_direct_debit.model_payment_mode
273+msgid "Payment Mode"
274+msgstr "Modo de pago"
275+
276+#. module: account_payment_direct_debit
277+#: code:addons/account_payment_direct_debit/model/payment_line.py:140
278+#, python-format
279+msgid "Can not reconcile"
280+msgstr "No se puede reconciliar"
281+
282+#. module: account_payment_direct_debit
283+#: view:account.invoice:0
284+msgid "Debit Denied"
285+msgstr "Adeudo denegado"
286+
287+#. module: account_payment_direct_debit
288+#: code:addons/account_payment_direct_debit/model/account_invoice.py:147
289+#, python-format
290+msgid "Error !"
291+msgstr "Error !"
292+
293+#. module: account_payment_direct_debit
294+#: view:account.invoice:0
295+msgid "Show only invoices with state Debit denied"
296+msgstr "Mostrar solo las facturas con adeudo denegado"
297+
298+#. module: account_payment_direct_debit
299+#: model:ir.model,name:account_payment_direct_debit.model_account_move_line
300+msgid "Journal Items"
301+msgstr "Apuntes contables"
302+
303+#. module: account_payment_direct_debit
304+#: selection:payment.type,payment_order_type:0
305+msgid "Payment"
306+msgstr "Pago"
307+
308+#. module: account_payment_direct_debit
309+#: view:account.invoice:0
310+msgid "Debit denied"
311+msgstr "Adeudo denegado"
312+
313+#. module: account_payment_direct_debit
314+#: model:account.payment.term,name:account_payment_direct_debit.payment_term_direct_debit
315+#: selection:payment.type,payment_order_type:0
316+msgid "Direct debit"
317+msgstr "Adeudo directo"
318+
319+#. module: account_payment_direct_debit
320+#: code:addons/account_payment_direct_debit/model/account_invoice.py:148
321+#, python-format
322+msgid "You cannot set invoice '%s' to state 'debit denied', as it is still reconciled."
323+msgstr "No puede cambiar la factura '%s' a estado 'Adeudo denegado', porque esta aun conciliada."
324+
325+#. module: account_payment_direct_debit
326+#: code:addons/account_payment_direct_debit/model/account_invoice.py:152
327+#, python-format
328+msgid "Invoice '%s': direct debit is denied."
329+msgstr "Factura '%s': adeudo directo es denegado."
330+
331+#. module: account_payment_direct_debit
332+#: model:ir.model,name:account_payment_direct_debit.model_payment_order_create
333+msgid "payment.order.create"
334+msgstr "pago.orden.crear"
335+
336+#. module: account_payment_direct_debit
337+#: field:payment.line,storno:0
338+msgid "Storno"
339+msgstr "Anulación"
340+
341+#. module: account_payment_direct_debit
342+#: help:payment.line,storno:0
343+msgid "If this is true, the debit order has been canceled by the bank or by the customer"
344+msgstr "Si esta seleccionado, el adeudo directo ha sido cancelado por el banco o el cliente"
345+
346+#. module: account_payment_direct_debit
347+#: model:ir.model,name:account_payment_direct_debit.model_payment_type
348+msgid "Payment type"
349+msgstr "Tipo de pago"
350+
351+#. module: account_payment_direct_debit
352+#: code:addons/account_payment_direct_debit/model/payment_line.py:141
353+#, python-format
354+msgid "Cancelation of payment line '%s' has already been processed"
355+msgstr "La cancelación de la linea de pago '%s' ha sido procesada"
356+
357+#. module: account_payment_direct_debit
358+#: field:account.move.line,amount_to_receive:0
359+msgid "Amount to receive"
360+msgstr "Cantidad a recibir"
361+
362+#. module: account_payment_direct_debit
363+#: model:ir.model,name:account_payment_direct_debit.model_account_invoice
364+msgid "Invoice"
365+msgstr "Factura"
366+
367
368=== added file 'account_payment_direct_debit/i18n/nl.po'
369--- account_payment_direct_debit/i18n/nl.po 1970-01-01 00:00:00 +0000
370+++ account_payment_direct_debit/i18n/nl.po 2014-02-09 13:36:47 +0000
371@@ -0,0 +1,155 @@
372+# Dutch translation for banking-addons
373+# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
374+# This file is distributed under the same license as the banking-addons package.
375+# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
376+#
377+msgid ""
378+msgstr ""
379+"Project-Id-Version: banking-addons\n"
380+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
381+"POT-Creation-Date: 2013-10-25 16:01+0000\n"
382+"PO-Revision-Date: 2013-12-03 11:31+0000\n"
383+"Last-Translator: Erwin van der Ploeg (BAS Solutions) <Unknown>\n"
384+"Language-Team: Dutch <nl@li.org>\n"
385+"MIME-Version: 1.0\n"
386+"Content-Type: text/plain; charset=UTF-8\n"
387+"Content-Transfer-Encoding: 8bit\n"
388+"X-Launchpad-Export-Date: 2013-12-04 05:59+0000\n"
389+"X-Generator: Launchpad (build 16861)\n"
390+
391+#. module: account_direct_debit
392+#: model:account.payment.term,note:account_direct_debit.payment_term_direct_debit
393+msgid "Direct debit in 14 days"
394+msgstr "Incasso opdracht in 14 dagen"
395+
396+#. module: account_direct_debit
397+#: model:ir.model,name:account_direct_debit.model_payment_order
398+msgid "Payment Order"
399+msgstr "Betalingsopdracht"
400+
401+#. module: account_direct_debit
402+#: view:payment.order:0
403+msgid "Select Invoices to Collect"
404+msgstr "Selecteer openstaande posten ter incasso"
405+
406+#. module: account_direct_debit
407+#: model:ir.model,name:account_direct_debit.model_payment_line
408+msgid "Payment Line"
409+msgstr "Betaalregel"
410+
411+#. module: account_direct_debit
412+#: code:addons/account_direct_debit/model/payment_line.py:140
413+#, python-format
414+msgid "Can not reconcile"
415+msgstr "Kan niet afletteren"
416+
417+#. module: account_direct_debit
418+#: view:account.invoice:0
419+msgid "Debit Denied"
420+msgstr "Incasso geweigerd"
421+
422+#. module: account_direct_debit
423+#: code:addons/account_direct_debit/model/account_invoice.py:147
424+#, python-format
425+msgid "Error !"
426+msgstr "Fout !"
427+
428+#. module: account_direct_debit
429+#: view:account.invoice:0
430+msgid "Show only invoices with state Debit denied"
431+msgstr "Laat alleen facturen zien waarvan de incasso is geweigerd"
432+
433+#. module: account_direct_debit
434+#: view:payment.order:0
435+msgid ""
436+"{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', "
437+"'payment')]}"
438+msgstr ""
439+"{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', "
440+"'payment')]}"
441+
442+#. module: account_direct_debit
443+#: model:ir.model,name:account_direct_debit.model_account_move_line
444+msgid "Journal Items"
445+msgstr "Boekingen"
446+
447+#. module: account_direct_debit
448+#: view:account.invoice:0
449+msgid "Debit denied"
450+msgstr "Incasso geweigerd"
451+
452+#. module: account_direct_debit
453+#: model:ir.actions.act_window,name:account_direct_debit.action_debit_order_tree
454+#: model:ir.ui.menu,name:account_direct_debit.menu_action_debit_order_form
455+msgid "Direct Debit Orders"
456+msgstr "Incasso opdracht"
457+
458+#. module: account_direct_debit
459+#: model:account.payment.term,name:account_direct_debit.payment_term_direct_debit
460+msgid "Direct debit"
461+msgstr "Incasso opdracht"
462+
463+#. module: account_direct_debit
464+#: code:addons/account_direct_debit/model/account_invoice.py:148
465+#, python-format
466+msgid ""
467+"You cannot set invoice '%s' to state 'debit denied', as it is still "
468+"reconciled."
469+msgstr ""
470+"Het is niet mogelijk om factuur '%s' in status 'Incasso geweigerd' te "
471+"zetten, omdat deze nog is afgeletterd."
472+
473+#. module: account_direct_debit
474+#: code:addons/account_direct_debit/model/account_invoice.py:152
475+#, python-format
476+msgid "Invoice '%s': direct debit is denied."
477+msgstr "Factuur '%s': Incasso geweigerd"
478+
479+#. module: account_direct_debit
480+#: code:addons/account_direct_debit/model/payment_line.py:141
481+#, python-format
482+msgid "Cancelation of payment line '%s' has already been processed"
483+msgstr "Het annuleren van de betaalopdrachtregel '%s' is al verwerkt"
484+
485+#. module: account_direct_debit
486+#: model:ir.model,name:account_direct_debit.model_payment_order_create
487+msgid "payment.order.create"
488+msgstr "payment.order.create"
489+
490+#. module: account_direct_debit
491+#: field:payment.line,storno:0
492+msgid "Storno"
493+msgstr "Storno"
494+
495+#. module: account_direct_debit
496+#: help:payment.line,storno:0
497+msgid ""
498+"If this is true, the debit order has been canceled by the bank or by the "
499+"customer"
500+msgstr ""
501+"Indien aangevinkt is de incasso opdracht al geannuleerd dor de bank of de "
502+"klant."
503+
504+#. module: account_direct_debit
505+#: model:ir.actions.act_window,help:account_direct_debit.action_debit_order_tree
506+msgid ""
507+"A debit order is a debit request from your company to collect customer "
508+"invoices. Here you can register all debit orders that should be done, keep "
509+"track of all debit orders and mention the invoice reference and the partner "
510+"the withdrawal should be done for."
511+msgstr ""
512+"Een incasso opdracht is een opdracht van uw bedrijf aan uw klant voor het "
513+"incasseren van openstaande posten. Hier kunt u alle incasso opdrachten "
514+"invoeren die moeten worden uitgevoerd en overzicht houden op alle incasso "
515+"opdrachten. Tevens voert u hier de factuurreferentie en klant in waar de "
516+"afschrijving moet plaatsvinden."
517+
518+#. module: account_direct_debit
519+#: field:account.move.line,amount_to_receive:0
520+msgid "Amount to receive"
521+msgstr "Bedrag te ontvangen"
522+
523+#. module: account_direct_debit
524+#: model:ir.model,name:account_direct_debit.model_account_invoice
525+msgid "Invoice"
526+msgstr "Factuur"
527
528=== added directory 'account_payment_direct_debit/migrations'
529=== added directory 'account_payment_direct_debit/migrations/7.0.2'
530=== added file 'account_payment_direct_debit/migrations/7.0.2/post-migration.py'
531--- account_payment_direct_debit/migrations/7.0.2/post-migration.py 1970-01-01 00:00:00 +0000
532+++ account_payment_direct_debit/migrations/7.0.2/post-migration.py 2014-02-09 13:36:47 +0000
533@@ -0,0 +1,38 @@
534+# -*- coding: utf-8 -*-
535+##############################################################################
536+#
537+# Copyright (C) 2013 Therp BV (<http://therp.nl>).
538+#
539+# All other contributions are (C) by their respective contributors
540+#
541+# All Rights Reserved
542+#
543+# This program is free software: you can redistribute it and/or modify
544+# it under the terms of the GNU Affero General Public License as
545+# published by the Free Software Foundation, either version 3 of the
546+# License, or (at your option) any later version.
547+#
548+# This program is distributed in the hope that it will be useful,
549+# but WITHOUT ANY WARRANTY; without even the implied warranty of
550+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
551+# GNU Affero General Public License for more details.
552+#
553+# You should have received a copy of the GNU Affero General Public License
554+# along with this program. If not, see <http://www.gnu.org/licenses/>.
555+#
556+##############################################################################
557+
558+def migrate(cr, version):
559+ if not version:
560+ return
561+ cr.execute(
562+ """
563+ UPDATE payment_line
564+ SET transit_move_line_id = banking_addons_61_debit_move_line_id
565+ """)
566+ cr.execute(
567+ """
568+ ALTER TABLE "payment_line"
569+ DROP COLUMN "banking_addons_61_debit_move_line_id"
570+ """
571+ )
572
573=== added file 'account_payment_direct_debit/migrations/7.0.2/pre-migration.py'
574--- account_payment_direct_debit/migrations/7.0.2/pre-migration.py 1970-01-01 00:00:00 +0000
575+++ account_payment_direct_debit/migrations/7.0.2/pre-migration.py 2014-02-09 13:36:47 +0000
576@@ -0,0 +1,51 @@
577+# -*- coding: utf-8 -*-
578+##############################################################################
579+#
580+# Copyright (C) 2013 Therp BV (<http://therp.nl>).
581+#
582+# All other contributions are (C) by their respective contributors
583+#
584+# All Rights Reserved
585+#
586+# This program is free software: you can redistribute it and/or modify
587+# it under the terms of the GNU Affero General Public License as
588+# published by the Free Software Foundation, either version 3 of the
589+# License, or (at your option) any later version.
590+#
591+# This program is distributed in the hope that it will be useful,
592+# but WITHOUT ANY WARRANTY; without even the implied warranty of
593+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
594+# GNU Affero General Public License for more details.
595+#
596+# You should have received a copy of the GNU Affero General Public License
597+# along with this program. If not, see <http://www.gnu.org/licenses/>.
598+#
599+##############################################################################
600+
601+import logging
602+logger = logging.getLogger()
603+
604+def rename_columns(cr, column_spec):
605+ """
606+ Rename table columns. Taken from OpenUpgrade.
607+
608+ :param column_spec: a hash with table keys, with lists of tuples as values. \
609+ Tuples consist of (old_name, new_name).
610+
611+ """
612+ for table in column_spec.keys():
613+ for (old, new) in column_spec[table]:
614+ logger.info("table %s, column %s: renaming to %s",
615+ table, old, new)
616+ cr.execute('ALTER TABLE "%s" RENAME "%s" TO "%s"' % (table, old, new,))
617+ cr.execute('DROP INDEX IF EXISTS "%s_%s_index"' % (table, old))
618+
619+def migrate(cr, version):
620+ if not version:
621+ return
622+
623+ # rename field debit_move_line_id
624+ rename_columns(cr, {
625+ 'payment_line': [
626+ ('debit_move_line_id', 'banking_addons_61_debit_move_line_id'),
627+ ]})
628
629=== added directory 'account_payment_direct_debit/model'
630=== added file 'account_payment_direct_debit/model/__init__.py'
631--- account_payment_direct_debit/model/__init__.py 1970-01-01 00:00:00 +0000
632+++ account_payment_direct_debit/model/__init__.py 2014-02-09 13:36:47 +0000
633@@ -0,0 +1,6 @@
634+import account_payment
635+import payment_line
636+import account_move_line
637+import account_invoice
638+import payment_order_create
639+import payment_type
640
641=== added file 'account_payment_direct_debit/model/account_invoice.py'
642--- account_payment_direct_debit/model/account_invoice.py 1970-01-01 00:00:00 +0000
643+++ account_payment_direct_debit/model/account_invoice.py 2014-02-09 13:36:47 +0000
644@@ -0,0 +1,164 @@
645+# -*- coding: utf-8 -*-
646+##############################################################################
647+#
648+# Copyright (C) 2011 - 2013 Therp BV (<http://therp.nl>).
649+#
650+# All other contributions are (C) by their respective contributors
651+#
652+# All Rights Reserved
653+#
654+# This program is free software: you can redistribute it and/or modify
655+# it under the terms of the GNU Affero General Public License as
656+# published by the Free Software Foundation, either version 3 of the
657+# License, or (at your option) any later version.
658+#
659+# This program is distributed in the hope that it will be useful,
660+# but WITHOUT ANY WARRANTY; without even the implied warranty of
661+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
662+# GNU Affero General Public License for more details.
663+#
664+# You should have received a copy of the GNU Affero General Public License
665+# along with this program. If not, see <http://www.gnu.org/licenses/>.
666+#
667+##############################################################################
668+
669+from openerp.osv import orm
670+from openerp.tools.translate import _
671+
672+"""
673+This module adds support for Direct debit orders as applicable
674+in the Netherlands. Debit orders are advanced in total by the bank.
675+Amounts that cannot be debited or are canceled by account owners are
676+credited afterwards. Such a creditation is called a storno.
677+
678+Invoice workflow:
679+
680+1 the sale leads to
681+ 1300 Debtors 100
682+ 8000 Sales 100
683+
684+Balance:
685+ Debtors 2000 |
686+ Sales | 2000
687+
688+2 an external booking takes place
689+ 1100 Bank 100
690+ 1300 Debtors 100
691+ This booking is reconciled with [1]
692+ The invoice gets set to state 'paid', and 'reconciled' = True
693+
694+Balance:
695+ Debtors 1900 |
696+ Bank 100 |
697+ Sales | 2000
698+
699+This module implements the following diversion:
700+
701+2a the invoice is included in a direct debit order. When the order is
702+ confirmed, a move is created per invoice:
703+
704+ 2000 Transfer account 100 |
705+ 1300 Debtors | 100
706+ Reconciliation takes place between 1 and 2a.
707+ The invoice gets set to state 'paid', and 'reconciled' = True
708+
709+Balance:
710+ Debtors 0 |
711+ Transfer account 2000 |
712+ Bank 0 |
713+ Sales | 2000
714+
715+3a the direct debit order is booked on the bank account
716+
717+Balance:
718+ 1100 Bank 2000 |
719+ 2000 Transfer account | 2000
720+ Reconciliation takes place between 3a and 2a
721+
722+Balance:
723+ Debtors 0 |
724+ Transfer account 0 |
725+ Bank 2000 |
726+ Sales | 2000
727+
728+4 a storno from invoice [1] triggers a new booking on the bank account
729+ 1300 Debtors 100 |
730+ 1100 Bank | 100
731+
732+Balance:
733+ Debtors 100 |
734+ Transfer account 0 |
735+ Bank 1900 |
736+ Sales | 2000
737+
738+ The reconciliation of 2a is undone. The booking of 2a is reconciled
739+ with the booking of 4 instead.
740+ The payment line attribute 'storno' is set to True and the invoice
741+ state is no longer 'paid'.
742+
743+Two cases need to be distinguisted:
744+ 1) If the storno is a manual storno from the partner, the invoice is set to
745+ state 'debit_denied', with 'reconciled' = False
746+ This module implements this option by allowing the bank module to call
747+
748+ netsvc.LocalService("workflow").trg_validate(
749+ uid, 'account.invoice', ids, 'debit_denied', cr)
750+
751+ 2) If the storno is an error generated by the bank (assumingly non-fatal),
752+ the invoice is reopened for the next debit run. This is a call to existing
753+
754+ netsvc.LocalService("workflow").trg_validate(
755+ uid, 'account.invoice', ids, 'open_test', cr)
756+
757+ Should also be adding a log entry on the invoice for tracing purposes
758+
759+ self._log_event(cr, uid, ids, -1.0, 'Debit denied')
760+
761+ If not for that funny comment
762+ "#TODO: implement messages system" in account/invoice.py
763+
764+ Repeating non-fatal fatal errors need to be dealt with manually by checking
765+ open invoices with a matured invoice- or due date.
766+"""
767+
768+class account_invoice(orm.Model):
769+ _inherit = "account.invoice"
770+
771+ def __init__(self, pool, cr):
772+ """
773+ Adding a state to the hardcoded state list of the inherited
774+ model. The alternative is duplicating the field definition
775+ in columns but only one module can do that!
776+
777+ Maybe apply a similar trick when overriding the buttons' 'states' attributes
778+ in the form view, manipulating the xml in fields_view_get().
779+ """
780+ super(account_invoice, self).__init__(pool, cr)
781+ invoice_obj = pool.get('account.invoice')
782+ invoice_obj._columns['state'].selection.append(
783+ ('debit_denied', 'Debit denied'))
784+
785+ def action_debit_denied(self, cr, uid, ids, context=None):
786+ for invoice_id in ids:
787+ if self.test_paid(cr, uid, [invoice_id], context):
788+ number = self.read(
789+ cr, uid, invoice_id, ['number'], context=context)['number']
790+ raise orm.except_orm(
791+ _('Error !'),
792+ _('You cannot set invoice \'%s\' to state \'debit denied\', ' +
793+ 'as it is still reconciled.') % number)
794+ self.write(cr, uid, ids, {'state': 'debit_denied'}, context=context)
795+ for inv_id, name in self.name_get(cr, uid, ids, context=context):
796+ message = _("Invoice '%s': direct debit is denied.") % name
797+ self.log(cr, uid, inv_id, message)
798+ return True
799+
800+ def test_undo_debit_denied(self, cr, uid, ids, context=None):
801+ """
802+ Called from the workflow. Used to unset paid state on
803+ invoices that were paid with bank transfers which are being cancelled
804+ """
805+ for invoice in self.read(cr, uid, ids, ['reconciled'], context):
806+ if not invoice['reconciled']:
807+ return False
808+ return True
809
810=== added file 'account_payment_direct_debit/model/account_move_line.py'
811--- account_payment_direct_debit/model/account_move_line.py 1970-01-01 00:00:00 +0000
812+++ account_payment_direct_debit/model/account_move_line.py 2014-02-09 13:36:47 +0000
813@@ -0,0 +1,126 @@
814+# -*- coding: utf-8 -*-
815+##############################################################################
816+#
817+# OpenERP, Open Source Management Solution
818+# This module (C) 2011 - 2013 Therp BV (<http://therp.nl>).
819+# (C) 2011 Smile Benelux (<http://smile.fr>).
820+#
821+# This program is free software: you can redistribute it and/or modify
822+# it under the terms of the GNU Affero General Public License as
823+# published by the Free Software Foundation, either version 3 of the
824+# License, or (at your option) any later version.
825+#
826+# This program is distributed in the hope that it will be useful,
827+# but WITHOUT ANY WARRANTY; without even the implied warranty of
828+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
829+# GNU Affero General Public License for more details.
830+#
831+# You should have received a copy of the GNU Affero General Public License
832+# along with this program. If not, see <http://www.gnu.org/licenses/>.
833+#
834+##############################################################################
835+
836+from operator import itemgetter
837+from openerp.osv import fields, orm
838+
839+class account_move_line(orm.Model):
840+ _inherit = "account.move.line"
841+
842+ def amount_to_receive(self, cr, uid, ids, name, arg={}, context=None):
843+ """
844+ Return the amount still to receive regarding all the debit orders
845+ (excepting canceled orders).
846+ This is the reverse from amount_to_pay() in
847+ account_payment/account_move_line.py
848+ """
849+ if not ids:
850+ return {}
851+ cr.execute("""SELECT ml.id,
852+ CASE WHEN ml.amount_currency > 0
853+ THEN ml.amount_currency
854+ ELSE ml.debit
855+ END -
856+ (SELECT coalesce(sum(amount_currency),0)
857+ FROM payment_line pl
858+ INNER JOIN payment_order po
859+ ON (pl.order_id = po.id)
860+ WHERE move_line_id = ml.id
861+ AND pl.storno is false
862+ AND po.state != 'cancel') AS amount
863+ FROM account_move_line ml
864+ WHERE id IN %s""", (tuple(ids),))
865+ r = dict(cr.fetchall())
866+ return r
867+
868+ def _to_receive_search(self, cr, uid, obj, name, args, context=None):
869+ """
870+ Reverse of account_payment/account_move_line.py:_to_pay_search()
871+ """
872+ if not args:
873+ return []
874+ line_obj = self.pool.get('account.move.line')
875+ query = line_obj._query_get(cr, uid, context=context)
876+ where = ' and '.join(map(lambda x: '''(SELECT
877+ CASE WHEN l.amount_currency > 0
878+ THEN l.amount_currency
879+ ELSE l.debit
880+ END - coalesce(sum(pl.amount_currency), 0)
881+ FROM payment_line pl
882+ INNER JOIN payment_order po ON (pl.order_id = po.id)
883+ WHERE move_line_id = l.id
884+ AND pl.storno is false
885+ AND po.state != 'cancel'
886+ ) %(operator)s %%s ''' % {'operator': x[1]}, args))
887+ sql_args = tuple(map(itemgetter(2), args))
888+
889+ cr.execute(('''SELECT id
890+ FROM account_move_line l
891+ WHERE account_id IN (select id
892+ FROM account_account
893+ WHERE type=%s AND active)
894+ AND reconcile_id IS null
895+ AND debit > 0
896+ AND ''' + where + ' and ' + query), ('receivable',)+sql_args )
897+
898+ res = cr.fetchall()
899+ if not res:
900+ return [('id', '=', '0')]
901+ return [('id', 'in', map(lambda x:x[0], res))]
902+
903+ def line2bank(self, cr, uid, ids, payment_mode_id=None, context=None):
904+ '''I have to inherit this function for direct debits to fix the
905+ following issue : if the customer invoice has a value for
906+ 'partner_bank_id', then it will take this partner_bank_id
907+ in the payment line... but, on a customer invoice,
908+ the partner_bank_id is the bank account of the company,
909+ not the bank account of the customer !
910+ '''
911+ if context is None:
912+ context = {}
913+ pay_mode_obj = self.pool['payment.mode']
914+ payment_mode_id = (
915+ payment_mode_id or context.get('_fix_payment_mode_id'))
916+ if payment_mode_id:
917+ pay_mode = pay_mode_obj.browse(
918+ cr, uid, payment_mode_id, context=context)
919+ if pay_mode.type.payment_order_type == 'debit':
920+ line2bank = {}
921+ bank_type = pay_mode_obj.suitable_bank_types(
922+ cr, uid, payment_mode_id, context=context)
923+ for line in self.browse(cr, uid, ids, context=context):
924+ line2bank[line.id] = False
925+ if line.partner_id:
926+ for bank in line.partner_id.bank_ids:
927+ if bank.state in bank_type:
928+ line2bank[line.id] = bank.id
929+ break
930+ return line2bank
931+ return super(account_move_line, self).line2bank(
932+ cr, uid, ids, payment_mode_id, context=context)
933+
934+ _columns = {
935+ 'amount_to_receive': fields.function(
936+ amount_to_receive, method=True,
937+ type='float', string='Amount to receive',
938+ fnct_search=_to_receive_search),
939+ }
940
941=== added file 'account_payment_direct_debit/model/account_payment.py'
942--- account_payment_direct_debit/model/account_payment.py 1970-01-01 00:00:00 +0000
943+++ account_payment_direct_debit/model/account_payment.py 2014-02-09 13:36:47 +0000
944@@ -0,0 +1,21 @@
945+# -*- coding: utf-8 -*-
946+from openerp.osv import orm, fields
947+import netsvc
948+from tools.translate import _
949+
950+class payment_order(orm.Model):
951+ _inherit = 'payment.order'
952+
953+ def test_undo_done(self, cr, uid, ids, context=None):
954+ """
955+ Called from the workflow. Used to unset done state on
956+ payment orders that were reconciled with bank transfers
957+ which are being cancelled
958+ """
959+ for order in self.browse(cr, uid, ids, context=context):
960+ if order.type == 'receivable':
961+ for line in order.line_ids:
962+ if line.storno:
963+ return False
964+ return super(payment_order, self).test_undo_done(
965+ cr, uid, ids, context=context)
966
967=== added file 'account_payment_direct_debit/model/payment_line.py'
968--- account_payment_direct_debit/model/payment_line.py 1970-01-01 00:00:00 +0000
969+++ account_payment_direct_debit/model/payment_line.py 2014-02-09 13:36:47 +0000
970@@ -0,0 +1,152 @@
971+# -*- coding: utf-8 -*-
972+from openerp.osv import orm, fields
973+import netsvc
974+from tools.translate import _
975+
976+class payment_line(orm.Model):
977+ _inherit = 'payment.line'
978+
979+ def debit_storno(self, cr, uid, payment_line_id, amount,
980+ currency, storno_retry=True, context=None):
981+ """
982+ The processing of a storno is triggered by a debit
983+ transfer on one of the company's bank accounts.
984+ This method offers to re-reconcile the original debit
985+ payment. For this purpose, we have registered that
986+ payment move on the payment line.
987+
988+ Return the (now incomplete) reconcile id. The caller MUST
989+ re-reconcile this reconcile with the bank transfer and
990+ re-open the associated invoice.
991+
992+ :param payment_line_id: the single payment line id
993+ :param amount: the (signed) amount debited from the bank account
994+ :param currency: the bank account's currency *browse object*
995+ :param boolean storno_retry: when True, attempt to reopen the invoice, \
996+ set the invoice to 'Debit denied' otherwise.
997+ :return: an incomplete reconcile for the caller to fill
998+ :rtype: database id of an account.move.reconcile resource.
999+ """
1000+
1001+ move_line_obj = self.pool.get('account.move.line')
1002+ reconcile_obj = self.pool.get('account.move.reconcile')
1003+ line = self.browse(cr, uid, payment_line_id)
1004+ reconcile_id = False
1005+ if (line.transit_move_line_id and not line.storno and
1006+ self.pool.get('res.currency').is_zero(
1007+ cr, uid, currency, (
1008+ (line.transit_move_line_id.credit or 0.0) -
1009+ (line.transit_move_line_id.debit or 0.0) + amount))):
1010+ # Two different cases, full and partial
1011+ # Both cases differ subtly in the procedure to follow
1012+ # Needs refractoring, but why is this not in the OpenERP API?
1013+ # Actually, given the nature of a direct debit order and storno,
1014+ # we should not need to take partial into account on the side of
1015+ # the transit_move_line.
1016+ if line.transit_move_line_id.reconcile_partial_id:
1017+ reconcile_id = line.transit_move_line_id.reconcile_partial_id.id
1018+ attribute = 'reconcile_partial_id'
1019+ if len(line.transit_move_line_id.reconcile_id.line_partial_ids) == 2:
1020+ # reuse the simple reconcile for the storno transfer
1021+ reconcile_obj.write(
1022+ cr, uid, reconcile_id, {
1023+ 'line_id': [(6, 0, line.transit_move_line_id.id)],
1024+ 'line_partial_ids': [(6, 0, [])],
1025+ }, context=context)
1026+ else:
1027+ # split up the original reconcile in a partial one
1028+ # and a new one for reconciling the storno transfer
1029+ reconcile_obj.write(
1030+ cr, uid, reconcile_id, {
1031+ 'line_partial_ids': [(3, line.transit_move_line_id.id)],
1032+ }, context=context)
1033+ reconcile_id = reconcile_obj.create(
1034+ cr, uid, {
1035+ 'type': 'auto',
1036+ 'line_id': [(6, 0, line.transit_move_line_id.id)],
1037+ }, context=context)
1038+ elif line.transit_move_line_id.reconcile_id:
1039+ reconcile_id = line.transit_move_line_id.reconcile_id.id
1040+ if len(line.transit_move_line_id.reconcile_id.line_id) == 2:
1041+ # reuse the simple reconcile for the storno transfer
1042+ reconcile_obj.write(
1043+ cr, uid, reconcile_id, {
1044+ 'line_id': [(6, 0, [line.transit_move_line_id.id])]
1045+ }, context=context)
1046+ else:
1047+ # split up the original reconcile in a partial one
1048+ # and a new one for reconciling the storno transfer
1049+ partial_ids = [
1050+ x.id for x in line.transit_move_line_id.reconcile_id.line_id
1051+ if x.id != line.transit_move_line_id.id
1052+ ]
1053+ reconcile_obj.write(
1054+ cr, uid, reconcile_id, {
1055+ 'line_partial_ids': [(6, 0, partial_ids)],
1056+ 'line_id': [(6, 0, [])],
1057+ }, context=context)
1058+ reconcile_id = reconcile_obj.create(
1059+ cr, uid, {
1060+ 'type': 'auto',
1061+ 'line_id': [(6, 0, line.transit_move_line_id.id)],
1062+ }, context=context)
1063+ # mark the payment line for storno processed
1064+ if reconcile_id:
1065+ self.write(cr, uid, [payment_line_id],
1066+ {'storno': True}, context=context)
1067+ # put forth the invoice workflow
1068+ if line.move_line_id.invoice:
1069+ activity = (storno_retry and 'open_test'
1070+ or 'invoice_debit_denied')
1071+ netsvc.LocalService("workflow").trg_validate(
1072+ uid, 'account.invoice', line.move_line_id.invoice.id,
1073+ activity, cr)
1074+ return reconcile_id
1075+
1076+ def get_storno_account_id(self, cr, uid, payment_line_id, amount,
1077+ currency, context=None):
1078+ """
1079+ Check the match of the arguments, and return the account associated
1080+ with the storno.
1081+ Used in account_banking interactive mode
1082+
1083+ :param payment_line_id: the single payment line id
1084+ :param amount: the (signed) amount debited from the bank account
1085+ :param currency: the bank account's currency *browse object*
1086+ :return: an account if there is a full match, False otherwise
1087+ :rtype: database id of an account.account resource.
1088+ """
1089+
1090+ line = self.browse(cr, uid, payment_line_id)
1091+ account_id = False
1092+ if (line.transit_move_line_id and not line.storno and
1093+ self.pool.get('res.currency').is_zero(
1094+ cr, uid, currency, (
1095+ (line.transit_move_line_id.credit or 0.0) -
1096+ (line.transit_move_line_id.debit or 0.0) + amount))):
1097+ account_id = line.transit_move_line_id.account_id.id
1098+ return account_id
1099+
1100+ def debit_reconcile(self, cr, uid, payment_line_id, context=None):
1101+ """
1102+ Raise if a payment line is passed for which storno is True
1103+ """
1104+ if isinstance(payment_line_id, (list, tuple)):
1105+ payment_line_id = payment_line_id[0]
1106+ payment_line_vals = self.read(
1107+ cr, uid, payment_line_id, ['storno', 'name'], context=context)
1108+ if payment_line_vals['storno']:
1109+ raise orm.except_orm(
1110+ _('Can not reconcile'),
1111+ _('Cancelation of payment line \'%s\' has already been '
1112+ 'processed') % payment_line_vals['name'])
1113+ return super(payment_line, self).debit_reconcile(
1114+ cr, uid, payment_line_id, context=context)
1115+
1116+ _columns = {
1117+ 'storno': fields.boolean(
1118+ 'Storno',
1119+ readonly=True,
1120+ help=("If this is true, the debit order has been canceled "
1121+ "by the bank or by the customer")),
1122+ }
1123
1124=== added file 'account_payment_direct_debit/model/payment_order_create.py'
1125--- account_payment_direct_debit/model/payment_order_create.py 1970-01-01 00:00:00 +0000
1126+++ account_payment_direct_debit/model/payment_order_create.py 2014-02-09 13:36:47 +0000
1127@@ -0,0 +1,41 @@
1128+# -*- coding: utf-8 -*-
1129+##############################################################################
1130+#
1131+# Copyright (C) 2013 Therp BV (<http://therp.nl>).
1132+#
1133+# All other contributions are (C) by their respective contributors
1134+#
1135+# All Rights Reserved
1136+#
1137+# This program is free software: you can redistribute it and/or modify
1138+# it under the terms of the GNU Affero General Public License as
1139+# published by the Free Software Foundation, either version 3 of the
1140+# License, or (at your option) any later version.
1141+#
1142+# This program is distributed in the hope that it will be useful,
1143+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1144+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1145+# GNU Affero General Public License for more details.
1146+#
1147+# You should have received a copy of the GNU Affero General Public License
1148+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1149+#
1150+##############################################################################
1151+
1152+from openerp.osv import orm
1153+
1154+
1155+class payment_order_create(orm.TransientModel):
1156+ _inherit = 'payment.order.create'
1157+
1158+ def extend_payment_order_domain(
1159+ self, cr, uid, payment_order, domain, context=None):
1160+ super(payment_order_create, self).extend_payment_order_domain(
1161+ cr, uid, payment_order, domain, context=context)
1162+ if payment_order.type == 'receivable':
1163+ domain += [
1164+ ('account_id.type', '=', 'receivable'),
1165+ ('invoice.state', '!=', 'debit_denied'),
1166+ ('amount_to_receive', '>', 0),
1167+ ]
1168+ return True
1169
1170=== added file 'account_payment_direct_debit/model/payment_type.py'
1171--- account_payment_direct_debit/model/payment_type.py 1970-01-01 00:00:00 +0000
1172+++ account_payment_direct_debit/model/payment_type.py 2014-02-09 13:36:47 +0000
1173@@ -0,0 +1,41 @@
1174+# -*- coding: utf-8 -*-
1175+##############################################################################
1176+#
1177+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
1178+# (C) 2011 - 2013 Therp BV (<http://therp.nl>).
1179+#
1180+# All other contributions are (C) by their respective contributors
1181+#
1182+# All Rights Reserved
1183+#
1184+# This program is free software: you can redistribute it and/or modify
1185+# it under the terms of the GNU Affero General Public License as
1186+# published by the Free Software Foundation, either version 3 of the
1187+# License, or (at your option) any later version.
1188+#
1189+# This program is distributed in the hope that it will be useful,
1190+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1191+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1192+# GNU Affero General Public License for more details.
1193+#
1194+# You should have received a copy of the GNU Affero General Public License
1195+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1196+#
1197+##############################################################################
1198+
1199+from openerp.osv import orm, fields
1200+
1201+
1202+class payment_type(orm.Model):
1203+ _inherit = 'payment.type'
1204+
1205+ _columns = {
1206+ 'payment_order_type': fields.selection(
1207+ [('payment', 'Payment'),('debit', 'Direct debit')],
1208+ 'Payment order type', required=True,
1209+ ),
1210+ }
1211+
1212+ _defaults = {
1213+ 'payment_order_type': 'payment',
1214+ }
1215
1216=== added directory 'account_payment_direct_debit/view'
1217=== added file 'account_payment_direct_debit/view/account_invoice.xml'
1218--- account_payment_direct_debit/view/account_invoice.xml 1970-01-01 00:00:00 +0000
1219+++ account_payment_direct_debit/view/account_invoice.xml 2014-02-09 13:36:47 +0000
1220@@ -0,0 +1,41 @@
1221+<?xml version="1.0" encoding="utf-8"?>
1222+<openerp>
1223+ <data>
1224+ <record id="invoice_form" model="ir.ui.view">
1225+ <field name="name">account.invoice.form</field>
1226+ <field name="model">account.invoice</field>
1227+ <field name="inherit_id" ref="account.invoice_form"/>
1228+ <field name="arch" type="xml">
1229+ <data>
1230+ <!--
1231+ Add new state 'debit_denied' to applicable buttons.
1232+ Maybe apply trick in fields_view_get instead, for
1233+ better compatibility with other modules?
1234+ -->
1235+ <!-- button name="invoice_open" position="attributes">
1236+ <attribute name="states">draft,proforma2,debit_denied</attribute>
1237+ </button -->
1238+ <button name="invoice_open" position="after">
1239+ <button name="invoice_debit_denied" states="paid"
1240+ string="Debit Denied" icon="gtk-cancel"/>
1241+ </button>
1242+ </data>
1243+ </field>
1244+ </record>
1245+ <record id="view_account_invoice_filter" model="ir.ui.view">
1246+ <field name="name">account.invoice.select direct debit</field>
1247+ <field name="model">account.invoice</field>
1248+ <field name="type">search</field>
1249+ <field name="inherit_id" ref="account.view_account_invoice_filter"/>
1250+ <field name="arch" type="xml">
1251+ <filter name="invoices" position="after">
1252+ <filter name="debit_denied" icon="terp-dolar_ok!"
1253+ string="Debit denied"
1254+ domain="[('state','=','debit_denied')]"
1255+ help="Show only invoices with state Debit denied"
1256+ />
1257+ </filter>
1258+ </field>
1259+ </record>
1260+ </data>
1261+</openerp>
1262
1263=== added file 'account_payment_direct_debit/view/account_payment.xml'
1264--- account_payment_direct_debit/view/account_payment.xml 1970-01-01 00:00:00 +0000
1265+++ account_payment_direct_debit/view/account_payment.xml 2014-02-09 13:36:47 +0000
1266@@ -0,0 +1,69 @@
1267+<?xml version="1.0" encoding="utf-8"?>
1268+<openerp>
1269+ <data>
1270+
1271+ <!-- distinguish between payment orders and debit orders in the menu
1272+ <record id="account_payment.action_payment_order_tree" model="ir.actions.act_window">
1273+ <field name="domain">[('type', '=', 'payable')]</field>
1274+ <field name="context">{'search_type': 'payable'}</field>
1275+ </record>
1276+
1277+ <record id="action_debit_order_tree" model="ir.actions.act_window">
1278+ <field name="name">Direct Debit Orders</field>
1279+ <field name="res_model">payment.order</field>
1280+ <field name="view_type">form</field>
1281+ <field name="view_mode">tree,form</field>
1282+ <field name="context">{'search_type': 'receivable',
1283+ 'default_type': 'receivable'}</field>
1284+ <field name="search_view_id" ref="account_payment.view_payment_order_search"/>
1285+ <field name="domain">[('type', '=', 'receivable')]</field>
1286+ <field name="help">A debit order is a debit request from your company to collect customer invoices. Here you can register all debit orders that should be done, keep track of all debit orders and mention the invoice reference and the partner the withdrawal should be done for.</field>
1287+ </record>
1288+
1289+ <menuitem action="action_debit_order_tree" id="menu_action_debit_order_form" parent="account_payment.menu_main_payment" sequence="4"/>-->
1290+
1291+ <!--<record id="view_payment_order_form" model="ir.ui.view">
1292+ <field name="name">payment.order.form</field>
1293+ <field name="model">payment.order</field>
1294+ <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
1295+ <field name="priority" eval="60"/>
1296+ <field name="arch" type="xml">
1297+ <data>
1298+ <field name="reference" position="after">
1299+ <field name="payment_order_type"/>
1300+ </field>
1301+ <xpath expr="//button[@string='Select Invoices to Pay']"
1302+ position="attributes">
1303+ <attribute name="attrs">
1304+ {'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', 'payment')]}
1305+ </attribute>
1306+ </xpath>
1307+ <xpath expr="//button[@string='Select Invoices to Pay']"
1308+ position="after">
1309+ <button colspan="2" name="%(account_payment.action_create_payment_order)s"
1310+ string="Select Invoices to Collect" type="action"
1311+ attrs="{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', 'debit')]}"
1312+ icon="gtk-find"
1313+ />
1314+ </xpath>
1315+ <field name="mode" position="attributes">
1316+ <attribute name="domain">[('payment_order_type', '=', payment_order_type)]</attribute>
1317+ </field>
1318+ </data>
1319+ </field>
1320+ </record>-->
1321+
1322+ <record id="view_payment_line_tree" model="ir.ui.view">
1323+ <field name="name">Payment Lines</field>
1324+ <field name="model">payment.line</field>
1325+ <field name="inherit_id" ref="account_payment.view_payment_line_tree"/>
1326+ <field eval="4" name="priority"/>
1327+ <field name="arch" type="xml">
1328+ <field name="name" position="after">
1329+ <field name="storno"/>
1330+ </field>
1331+ </field>
1332+ </record>
1333+
1334+ </data>
1335+</openerp>
1336
1337=== added file 'account_payment_direct_debit/view/payment_type.xml'
1338--- account_payment_direct_debit/view/payment_type.xml 1970-01-01 00:00:00 +0000
1339+++ account_payment_direct_debit/view/payment_type.xml 2014-02-09 13:36:47 +0000
1340@@ -0,0 +1,17 @@
1341+<?xml version="1.0" encoding="utf-8"?>
1342+<openerp>
1343+ <data>
1344+
1345+ <record model="ir.ui.view" id="view_payment_type_form_inherit">
1346+ <field name="name">view.payment.type.form</field>
1347+ <field name="model">payment.type</field>
1348+ <field name="inherit_id" ref="account_payment_extension.view_payment_type_form"/>
1349+ <field name="arch" type="xml">
1350+ <field name="suitable_bank_types" position="after">
1351+ <field name="payment_order_type"/>
1352+ </field>
1353+ </field>
1354+ </record>
1355+
1356+ </data>
1357+</openerp>
1358
1359=== added directory 'account_payment_direct_debit/workflow'
1360=== added file 'account_payment_direct_debit/workflow/account_invoice.xml'
1361--- account_payment_direct_debit/workflow/account_invoice.xml 1970-01-01 00:00:00 +0000
1362+++ account_payment_direct_debit/workflow/account_invoice.xml 2014-02-09 13:36:47 +0000
1363@@ -0,0 +1,51 @@
1364+<?xml version="1.0" encoding="utf-8"?>
1365+<openerp>
1366+ <data>
1367+ <record id="act_debit_denied" model="workflow.activity">
1368+ <field name="wkf_id" ref="account.wkf"/>
1369+ <field name="name">debit_denied</field>
1370+ <field name="action">action_debit_denied()</field>
1371+ <field name="kind">function</field>
1372+ </record>
1373+ <record id="paid_to_debit_denied" model="workflow.transition">
1374+ <!--
1375+ Set an invoice to state debit denied, either manually
1376+ or by confirming a bank statement line that constitutes
1377+ a fatal storno
1378+ -->
1379+ <field name="act_from" ref="account.act_paid"/>
1380+ <field name="act_to" ref="act_debit_denied"/>
1381+ <field name="signal">invoice_debit_denied</field>
1382+ </record>
1383+ <record id="open_test_to_debit_denied" model="workflow.transition">
1384+ <!--
1385+ A storno leads to unreconciling the move line, which
1386+ reopens the invoice. We need to allow a transition from
1387+ this state to the debit denied state if the storno is fatal.
1388+ -->
1389+ <field name="act_from" ref="account.act_open_test"/>
1390+ <field name="act_to" ref="act_debit_denied"/>
1391+ <field name="signal">invoice_debit_denied</field>
1392+ </record>
1393+ <record id="debit_denied_to_paid" model="workflow.transition">
1394+ <!--
1395+ Cancel a bank statement line that constitutes a fatal
1396+ storno
1397+ -->
1398+ <field name="act_from" ref="act_debit_denied"/>
1399+ <field name="act_to" ref="account.act_paid"/>
1400+ <field name="condition">test_undo_debit_denied()</field>
1401+ <field name="signal">undo_debit_denied</field>
1402+ </record>
1403+ <record id="debit_denied_to_open" model="workflow.transition">
1404+ <!--
1405+ Allow the user to manually reset a debit denied status
1406+ on a paid invoice (but only after manually unreconciling
1407+ the invoice)
1408+ -->
1409+ <field name="act_from" ref="act_debit_denied"/>
1410+ <field name="act_to" ref="account.act_open_test"/>
1411+ <field name="signal">open_test</field>
1412+ </record>
1413+ </data>
1414+</openerp>
1415
1416=== added directory 'account_payment_export'
1417=== added file 'account_payment_export/__init__.py'
1418--- account_payment_export/__init__.py 1970-01-01 00:00:00 +0000
1419+++ account_payment_export/__init__.py 2014-02-09 13:36:47 +0000
1420@@ -0,0 +1,1 @@
1421+from . import model
1422\ No newline at end of file
1423
1424=== added file 'account_payment_export/__openerp__.py'
1425--- account_payment_export/__openerp__.py 1970-01-01 00:00:00 +0000
1426+++ account_payment_export/__openerp__.py 2014-02-09 13:36:47 +0000
1427@@ -0,0 +1,62 @@
1428+# -*- coding: utf-8 -*-
1429+##############################################################################
1430+#
1431+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
1432+# (C) 2011 - 2013 Therp BV (<http://therp.nl>).
1433+# Copyright (C) 2014 Acysos S.L. (<http://acysos.com>).
1434+# @author: Ignacio Ibeas <ignacio@acysos.com>
1435+#
1436+# All other contributions are (C) by their respective contributors
1437+#
1438+# All Rights Reserved
1439+#
1440+# This program is free software: you can redistribute it and/or modify
1441+# it under the terms of the GNU Affero General Public License as
1442+# published by the Free Software Foundation, either version 3 of the
1443+# License, or (at your option) any later version.
1444+#
1445+# This program is distributed in the hope that it will be useful,
1446+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1447+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1448+# GNU Affero General Public License for more details.
1449+#
1450+# You should have received a copy of the GNU Affero General Public License
1451+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1452+#
1453+##############################################################################
1454+
1455+{
1456+ 'name': 'Account Payment - Payments Export Infrastructure',
1457+ 'version': '0.1.164',
1458+ 'license': 'AGPL-3',
1459+ 'author': 'Account Payment community',
1460+ 'website': 'https://launchpad.net/account-payment',
1461+ 'category': 'Banking addons',
1462+ 'depends': [
1463+ 'account_payment',
1464+ 'account_payment_extension',
1465+ 'base_iban', # for manual_bank_tranfer
1466+ ],
1467+ 'data': [
1468+ 'view/account_payment.xml',
1469+ 'view/bank_payment_manual.xml',
1470+ 'view/payment_mode.xml',
1471+ 'data/payment_type.xml',
1472+ ],
1473+ 'description': '''
1474+ Infrastructure to export payment orders.
1475+
1476+ This technical module provides the base infrastructure to export
1477+ payment orders for electronic banking. It provides the following
1478+ technical features:
1479+ * a new payment.mode.type model
1480+ * payment.mode now has a mandatory type
1481+ * a better implementation of payment_mode.suitable_bank_types() based on payment.mode.type
1482+ * the "make payment" button launches a wizard depending on the payment.mode.type
1483+ * a manual payment mode type is provided as an example, with a default "do nothing" wizard
1484+
1485+ Adapted to account_payment_extension by Acysos S.L. <info@acysos.com>
1486+ ''',
1487+ 'auto_install': True,
1488+ 'installable': True,
1489+}
1490
1491=== added directory 'account_payment_export/data'
1492=== added file 'account_payment_export/data/payment_type.xml'
1493--- account_payment_export/data/payment_type.xml 1970-01-01 00:00:00 +0000
1494+++ account_payment_export/data/payment_type.xml 2014-02-09 13:36:47 +0000
1495@@ -0,0 +1,14 @@
1496+<?xml version="1.0" encoding="utf-8"?>
1497+<openerp>
1498+ <data>
1499+ <!-- Add manual bank transfer as default payment option -->
1500+ <record model="payment.type" id="manual_bank_tranfer">
1501+ <field name="name">Manual Bank Transfer</field>
1502+ <field name="code">BANKMAN</field>
1503+ <field name="suitable_bank_types"
1504+ eval="[(6,0,[ref('base.bank_normal'),ref('base_iban.bank_iban'),])]" />
1505+ <field name="ir_model_id"
1506+ ref="model_payment_manual"/>
1507+ </record>
1508+ </data>
1509+</openerp>
1510
1511=== added directory 'account_payment_export/i18n'
1512=== added file 'account_payment_export/i18n/account_banking_payment_export.pot'
1513--- account_payment_export/i18n/account_banking_payment_export.pot 1970-01-01 00:00:00 +0000
1514+++ account_payment_export/i18n/account_banking_payment_export.pot 2014-02-09 13:36:47 +0000
1515@@ -0,0 +1,145 @@
1516+# Translation of OpenERP Server.
1517+# This file contains the translation of the following modules:
1518+# * account_banking_payment_export
1519+#
1520+msgid ""
1521+msgstr ""
1522+"Project-Id-Version: OpenERP Server 7.0\n"
1523+"Report-Msgid-Bugs-To: \n"
1524+"POT-Creation-Date: 2013-10-25 15:58+0000\n"
1525+"PO-Revision-Date: 2013-10-25 15:58+0000\n"
1526+"Last-Translator: <>\n"
1527+"Language-Team: \n"
1528+"MIME-Version: 1.0\n"
1529+"Content-Type: text/plain; charset=UTF-8\n"
1530+"Content-Transfer-Encoding: \n"
1531+"Plural-Forms: \n"
1532+
1533+#. module: account_banking_payment_export
1534+#: help:payment.mode.type,name:0
1535+msgid "Payment Type"
1536+msgstr ""
1537+
1538+#. module: account_banking_payment_export
1539+#: model:ir.model,name:account_banking_payment_export.model_payment_order
1540+msgid "Payment Order"
1541+msgstr ""
1542+
1543+#. module: account_banking_payment_export
1544+#: view:payment.manual:0
1545+msgid "Please execute payment order manually, and click OK when succesfully sent."
1546+msgstr ""
1547+
1548+#. module: account_banking_payment_export
1549+#: model:ir.model,name:account_banking_payment_export.model_payment_mode
1550+msgid "Payment Mode"
1551+msgstr ""
1552+
1553+#. module: account_banking_payment_export
1554+#: code:addons/account_banking_payment_export/model/account_payment.py:69
1555+#, python-format
1556+msgid "You can only combine payment orders of the same type"
1557+msgstr ""
1558+
1559+#. module: account_banking_payment_export
1560+#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type
1561+msgid "Payment Mode Type"
1562+msgstr ""
1563+
1564+#. module: account_banking_payment_export
1565+#: model:ir.model,name:account_banking_payment_export.model_account_move_line
1566+msgid "Journal Items"
1567+msgstr ""
1568+
1569+#. module: account_banking_payment_export
1570+#: model:ir.model,name:account_banking_payment_export.model_payment_manual
1571+msgid "Send payment order(s) manually"
1572+msgstr ""
1573+
1574+#. module: account_banking_payment_export
1575+#: field:payment.mode.type,name:0
1576+msgid "Name"
1577+msgstr ""
1578+
1579+#. module: account_banking_payment_export
1580+#: help:payment.mode.type,ir_model_id:0
1581+msgid "Select the Payment Wizard for payments of this type. Leave empty for manual processing"
1582+msgstr ""
1583+
1584+#. module: account_banking_payment_export
1585+#: view:payment.manual:0
1586+msgid "Manual payment"
1587+msgstr ""
1588+
1589+#. module: account_banking_payment_export
1590+#: field:payment.manual,payment_order_ids:0
1591+msgid "Payment orders"
1592+msgstr ""
1593+
1594+#. module: account_banking_payment_export
1595+#: code:addons/account_banking_payment_export/model/account_payment.py:52
1596+#, python-format
1597+msgid "Payment Order Export"
1598+msgstr ""
1599+
1600+#. module: account_banking_payment_export
1601+#: help:payment.mode,type:0
1602+msgid "Select the Payment Type for the Payment Mode."
1603+msgstr ""
1604+
1605+#. module: account_banking_payment_export
1606+#: view:payment.order:0
1607+msgid "launch_wizard"
1608+msgstr ""
1609+
1610+#. module: account_banking_payment_export
1611+#: help:payment.mode.type,code:0
1612+msgid "Specify the Code for Payment Type"
1613+msgstr ""
1614+
1615+#. module: account_banking_payment_export
1616+#: model:ir.model,name:account_banking_payment_export.model_payment_order_create
1617+msgid "payment.order.create"
1618+msgstr ""
1619+
1620+#. module: account_banking_payment_export
1621+#: code:addons/account_banking_payment_export/model/account_payment.py:68
1622+#, python-format
1623+msgid "Error"
1624+msgstr ""
1625+
1626+#. module: account_banking_payment_export
1627+#: field:payment.mode.type,ir_model_id:0
1628+msgid "Payment wizard"
1629+msgstr ""
1630+
1631+#. module: account_banking_payment_export
1632+#: field:payment.mode,type:0
1633+msgid "Payment type"
1634+msgstr ""
1635+
1636+#. module: account_banking_payment_export
1637+#: field:payment.mode.type,code:0
1638+msgid "Code"
1639+msgstr ""
1640+
1641+#. module: account_banking_payment_export
1642+#: view:payment.manual:0
1643+msgid "OK"
1644+msgstr ""
1645+
1646+#. module: account_banking_payment_export
1647+#: view:payment.mode.type:0
1648+msgid "Payment mode"
1649+msgstr ""
1650+
1651+#. module: account_banking_payment_export
1652+#: view:payment.manual:0
1653+msgid "Cancel"
1654+msgstr ""
1655+
1656+#. module: account_banking_payment_export
1657+#: field:payment.mode.type,suitable_bank_types:0
1658+msgid "Suitable bank types"
1659+msgstr ""
1660+
1661
1662=== added file 'account_payment_export/i18n/es.po'
1663--- account_payment_export/i18n/es.po 1970-01-01 00:00:00 +0000
1664+++ account_payment_export/i18n/es.po 2014-02-09 13:36:47 +0000
1665@@ -0,0 +1,110 @@
1666+# Translation of OpenERP Server.
1667+# This file contains the translation of the following modules:
1668+# * account_payment_export
1669+#
1670+msgid ""
1671+msgstr ""
1672+"Project-Id-Version: OpenERP Server 7.0-20131224-002412\n"
1673+"Report-Msgid-Bugs-To: \n"
1674+"POT-Creation-Date: 2014-01-25 11:26+0000\n"
1675+"PO-Revision-Date: 2014-01-25 11:26+0000\n"
1676+"Last-Translator: <>\n"
1677+"Language-Team: \n"
1678+"MIME-Version: 1.0\n"
1679+"Content-Type: text/plain; charset=UTF-8\n"
1680+"Content-Transfer-Encoding: \n"
1681+"Plural-Forms: \n"
1682+
1683+#. module: account_payment_export
1684+#: field:payment.type,ir_model_id:0
1685+msgid "Payment wizard"
1686+msgstr "Asistente de pago"
1687+
1688+#. module: account_payment_export
1689+#: model:ir.model,name:account_payment_export.model_payment_type
1690+msgid "Payment type"
1691+msgstr "Tipo de pago"
1692+
1693+#. module: account_payment_export
1694+#: model:ir.model,name:account_payment_export.model_payment_order
1695+msgid "Payment Order"
1696+msgstr "Orden de pago"
1697+
1698+#. module: account_payment_export
1699+#: view:payment.manual:0
1700+msgid "OK"
1701+msgstr "OK"
1702+
1703+#. module: account_payment_export
1704+#: model:ir.model,name:account_payment_export.model_payment_manual
1705+msgid "Send payment order(s) manually"
1706+msgstr "Enviar la orden de pago manualmente"
1707+
1708+#. module: account_payment_export
1709+#: help:payment.type,ir_model_id:0
1710+msgid "Select the Payment Wizard for payments of this type. Leave empty for manual processing"
1711+msgstr "Seleccione el asistente de pago para los pagos de estet tipo. Deje en blanco para proceso manual"
1712+
1713+#. module: account_payment_export
1714+#: model:ir.model,name:account_payment_export.model_payment_mode
1715+msgid "Payment Mode"
1716+msgstr "Modo de pago"
1717+
1718+#. module: account_payment_export
1719+#: view:payment.manual:0
1720+msgid "Manual payment"
1721+msgstr "Pago manual"
1722+
1723+#. module: account_payment_export
1724+#: field:payment.manual,payment_order_ids:0
1725+msgid "Payment orders"
1726+msgstr "Ordenes de pago"
1727+
1728+#. module: account_payment_export
1729+#: code:addons/account_payment_export/model/account_payment.py:52
1730+#, python-format
1731+msgid "Payment Order Export"
1732+msgstr "Exportar orden de pago"
1733+
1734+#. module: account_payment_export
1735+#: model:ir.model,name:account_payment_export.model_account_move_line
1736+msgid "Journal Items"
1737+msgstr "Apuntes contables"
1738+
1739+#. module: account_payment_export
1740+#: view:payment.order:0
1741+msgid "launch_wizard"
1742+msgstr "lanzar_asistente"
1743+
1744+#. module: account_payment_export
1745+#: view:payment.manual:0
1746+msgid "Please execute payment order manually, and click OK when succesfully sent."
1747+msgstr "Por favor, ejecute la orden de pago manualmente, y pulse OK cuando sea enviada con exito."
1748+
1749+#. module: account_payment_export
1750+#: model:ir.model,name:account_payment_export.model_payment_order_create
1751+msgid "payment.order.create"
1752+msgstr "pago.orden.crear"
1753+
1754+#. module: account_payment_export
1755+#: code:addons/account_payment_export/model/account_payment.py:68
1756+#, python-format
1757+msgid "Error"
1758+msgstr "Error"
1759+
1760+#. module: account_payment_export
1761+#: view:payment.manual:0
1762+msgid "Cancel"
1763+msgstr "Cancelar"
1764+
1765+#. module: account_payment_export
1766+#: model:payment.type,name:account_payment_export.manual_bank_tranfer
1767+msgid "Manual Bank Transfer"
1768+msgstr "Tranferencia bancaria manual"
1769+
1770+#. module: account_payment_export
1771+#: code:addons/account_payment_export/model/account_payment.py:69
1772+#, python-format
1773+msgid "You can only combine payment orders of the same type"
1774+msgstr "Solo puede combinar ordenes de pago del mismo tipo"
1775+
1776
1777=== added file 'account_payment_export/i18n/nl.po'
1778--- account_payment_export/i18n/nl.po 1970-01-01 00:00:00 +0000
1779+++ account_payment_export/i18n/nl.po 2014-02-09 13:36:47 +0000
1780@@ -0,0 +1,151 @@
1781+# Translation of OpenERP Server.
1782+# This file contains the translation of the following modules:
1783+# * account_banking_payment_export
1784+#
1785+msgid ""
1786+msgstr ""
1787+"Project-Id-Version: OpenERP Server 7.0\n"
1788+"Report-Msgid-Bugs-To: \n"
1789+"POT-Creation-Date: 2013-10-25 15:58+0000\n"
1790+"PO-Revision-Date: 2013-12-03 11:49+0000\n"
1791+"Last-Translator: Erwin van der Ploeg (BAS Solutions) <Unknown>\n"
1792+"Language-Team: \n"
1793+"MIME-Version: 1.0\n"
1794+"Content-Type: text/plain; charset=UTF-8\n"
1795+"Content-Transfer-Encoding: 8bit\n"
1796+"X-Launchpad-Export-Date: 2013-12-04 05:59+0000\n"
1797+"X-Generator: Launchpad (build 16861)\n"
1798+
1799+#. module: account_banking_payment_export
1800+#: help:payment.mode.type,name:0
1801+msgid "Payment Type"
1802+msgstr "Betaalwijze"
1803+
1804+#. module: account_banking_payment_export
1805+#: model:ir.model,name:account_banking_payment_export.model_payment_order
1806+msgid "Payment Order"
1807+msgstr "Betalingsopdracht"
1808+
1809+#. module: account_banking_payment_export
1810+#: view:payment.manual:0
1811+msgid ""
1812+"Please execute payment order manually, and click OK when succesfully sent."
1813+msgstr ""
1814+"Voer de betaalopdracht handmatig uit en klik OK, wanneer succesvol verzonden."
1815+
1816+#. module: account_banking_payment_export
1817+#: model:ir.model,name:account_banking_payment_export.model_payment_mode
1818+msgid "Payment Mode"
1819+msgstr "Betaalwijze"
1820+
1821+#. module: account_banking_payment_export
1822+#: code:addons/account_banking_payment_export/model/account_payment.py:69
1823+#, python-format
1824+msgid "You can only combine payment orders of the same type"
1825+msgstr "U kunt alleen betalingsopdrachten van dezelfde soort combineren"
1826+
1827+#. module: account_banking_payment_export
1828+#: model:ir.model,name:account_banking_payment_export.model_payment_mode_type
1829+msgid "Payment Mode Type"
1830+msgstr "Betaalwijze soort"
1831+
1832+#. module: account_banking_payment_export
1833+#: model:ir.model,name:account_banking_payment_export.model_account_move_line
1834+msgid "Journal Items"
1835+msgstr "Boekingen"
1836+
1837+#. module: account_banking_payment_export
1838+#: model:ir.model,name:account_banking_payment_export.model_payment_manual
1839+msgid "Send payment order(s) manually"
1840+msgstr "Verzend betaalopdrachten handmatig"
1841+
1842+#. module: account_banking_payment_export
1843+#: field:payment.mode.type,name:0
1844+msgid "Name"
1845+msgstr "Naam"
1846+
1847+#. module: account_banking_payment_export
1848+#: help:payment.mode.type,ir_model_id:0
1849+msgid ""
1850+"Select the Payment Wizard for payments of this type. Leave empty for manual "
1851+"processing"
1852+msgstr ""
1853+"Selecteer de wizard voor het verwerken van betalingen van dit type. Laat "
1854+"leeg voor handmatige verwerking."
1855+
1856+#. module: account_banking_payment_export
1857+#: view:payment.manual:0
1858+msgid "Manual payment"
1859+msgstr "Handmatige betaling"
1860+
1861+#. module: account_banking_payment_export
1862+#: field:payment.manual,payment_order_ids:0
1863+msgid "Payment orders"
1864+msgstr "Betaalopdrachten"
1865+
1866+#. module: account_banking_payment_export
1867+#: code:addons/account_banking_payment_export/model/account_payment.py:52
1868+#, python-format
1869+msgid "Payment Order Export"
1870+msgstr "Betaalopdracht export"
1871+
1872+#. module: account_banking_payment_export
1873+#: help:payment.mode,type:0
1874+msgid "Select the Payment Type for the Payment Mode."
1875+msgstr "Selecteer het type van de betaalmodus."
1876+
1877+#. module: account_banking_payment_export
1878+#: view:payment.order:0
1879+msgid "launch_wizard"
1880+msgstr "launch_wizard"
1881+
1882+#. module: account_banking_payment_export
1883+#: help:payment.mode.type,code:0
1884+msgid "Specify the Code for Payment Type"
1885+msgstr "Geef de code op voor het betaaltype"
1886+
1887+#. module: account_banking_payment_export
1888+#: model:ir.model,name:account_banking_payment_export.model_payment_order_create
1889+msgid "payment.order.create"
1890+msgstr "payment.order.create"
1891+
1892+#. module: account_banking_payment_export
1893+#: code:addons/account_banking_payment_export/model/account_payment.py:68
1894+#, python-format
1895+msgid "Error"
1896+msgstr "Fout"
1897+
1898+#. module: account_banking_payment_export
1899+#: field:payment.mode.type,ir_model_id:0
1900+msgid "Payment wizard"
1901+msgstr "Betaalwizard"
1902+
1903+#. module: account_banking_payment_export
1904+#: field:payment.mode,type:0
1905+msgid "Payment type"
1906+msgstr "Betaaltype"
1907+
1908+#. module: account_banking_payment_export
1909+#: field:payment.mode.type,code:0
1910+msgid "Code"
1911+msgstr "Code"
1912+
1913+#. module: account_banking_payment_export
1914+#: view:payment.manual:0
1915+msgid "OK"
1916+msgstr "OK"
1917+
1918+#. module: account_banking_payment_export
1919+#: view:payment.mode.type:0
1920+msgid "Payment mode"
1921+msgstr "Betaalwijze"
1922+
1923+#. module: account_banking_payment_export
1924+#: view:payment.manual:0
1925+msgid "Cancel"
1926+msgstr "Annuleren"
1927+
1928+#. module: account_banking_payment_export
1929+#: field:payment.mode.type,suitable_bank_types:0
1930+msgid "Suitable bank types"
1931+msgstr "Geschikte banktypen"
1932
1933=== added directory 'account_payment_export/model'
1934=== added file 'account_payment_export/model/__init__.py'
1935--- account_payment_export/model/__init__.py 1970-01-01 00:00:00 +0000
1936+++ account_payment_export/model/__init__.py 2014-02-09 13:36:47 +0000
1937@@ -0,0 +1,4 @@
1938+from . import account_payment
1939+from . import bank_payment_manual
1940+from . import payment_mode
1941+from . import payment_order_create
1942\ No newline at end of file
1943
1944=== added file 'account_payment_export/model/account_payment.py'
1945--- account_payment_export/model/account_payment.py 1970-01-01 00:00:00 +0000
1946+++ account_payment_export/model/account_payment.py 2014-02-09 13:36:47 +0000
1947@@ -0,0 +1,88 @@
1948+# -*- coding: utf-8 -*-
1949+##############################################################################
1950+#
1951+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
1952+# (C) 2011 - 2013 Therp BV (<http://therp.nl>).
1953+#
1954+# All other contributions are (C) by their respective contributors
1955+#
1956+# All Rights Reserved
1957+#
1958+# This program is free software: you can redistribute it and/or modify
1959+# it under the terms of the GNU Affero General Public License as
1960+# published by the Free Software Foundation, either version 3 of the
1961+# License, or (at your option) any later version.
1962+#
1963+# This program is distributed in the hope that it will be useful,
1964+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1965+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1966+# GNU Affero General Public License for more details.
1967+#
1968+# You should have received a copy of the GNU Affero General Public License
1969+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1970+#
1971+##############################################################################
1972+
1973+from openerp.osv import fields, orm
1974+from openerp.tools.translate import _
1975+from openerp import netsvc
1976+
1977+
1978+class payment_order(orm.Model):
1979+ _inherit = 'payment.order'
1980+
1981+ def launch_wizard(self, cr, uid, ids, context=None):
1982+ """
1983+ Search for a wizard to launch according to the type.
1984+ If type is manual. just confirm the order.
1985+ Previously (pre-v6) in account_payment/wizard/wizard_pay.py
1986+ """
1987+ if context == None:
1988+ context = {}
1989+ result = {}
1990+ orders = self.browse(cr, uid, ids, context)
1991+ order = orders[0]
1992+ # check if a wizard is defined for the first order
1993+ if order.mode.type and order.mode.type.ir_model_id:
1994+ context['active_ids'] = ids
1995+ wizard_model = order.mode.type.ir_model_id.model
1996+ wizard_obj = self.pool.get(wizard_model)
1997+ wizard_id = wizard_obj.create(cr, uid, {}, context)
1998+ result = {
1999+ 'name': wizard_obj._description or _('Payment Order Export'),
2000+ 'view_type': 'form',
2001+ 'view_mode': 'form',
2002+ 'res_model': wizard_model,
2003+ 'domain': [],
2004+ 'context': context,
2005+ 'type': 'ir.actions.act_window',
2006+ 'target': 'new',
2007+ 'res_id': wizard_id,
2008+ 'nodestroy': True,
2009+ }
2010+ else:
2011+ # should all be manual orders without type or wizard model
2012+ for order in orders[1:]:
2013+ if order.mode.type and order.mode.type.ir_model_id:
2014+ raise orm.except_orm(
2015+ _('Error'),
2016+ _('You can only combine payment orders of the same type')
2017+ )
2018+ # process manual payments
2019+ wf_service = netsvc.LocalService('workflow')
2020+ for order_id in ids:
2021+ wf_service.trg_validate(uid, 'payment.order', order_id, 'done', cr)
2022+ return result
2023+
2024+class payment_type(orm.Model):
2025+ _inherit = 'payment.type'
2026+
2027+ _columns = {
2028+ 'ir_model_id': fields.many2one(
2029+ 'ir.model', 'Payment wizard',
2030+ help=('Select the Payment Wizard for payments of this type. '
2031+ 'Leave empty for manual processing'),
2032+ domain=[('osv_memory', '=', True)],
2033+ ),
2034+ }
2035+
2036
2037=== added file 'account_payment_export/model/bank_payment_manual.py'
2038--- account_payment_export/model/bank_payment_manual.py 1970-01-01 00:00:00 +0000
2039+++ account_payment_export/model/bank_payment_manual.py 2014-02-09 13:36:47 +0000
2040@@ -0,0 +1,59 @@
2041+# -*- coding: utf-8 -*-
2042+##############################################################################
2043+#
2044+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
2045+# (C) 2011 - 2013 Therp BV (<http://therp.nl>).
2046+#
2047+# All other contributions are (C) by their respective contributors
2048+#
2049+# All Rights Reserved
2050+#
2051+# This program is free software: you can redistribute it and/or modify
2052+# it under the terms of the GNU Affero General Public License as
2053+# published by the Free Software Foundation, either version 3 of the
2054+# License, or (at your option) any later version.
2055+#
2056+# This program is distributed in the hope that it will be useful,
2057+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2058+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2059+# GNU Affero General Public License for more details.
2060+#
2061+# You should have received a copy of the GNU Affero General Public License
2062+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2063+#
2064+##############################################################################
2065+
2066+'''
2067+This module contains a single "wizard" for confirming manual
2068+bank transfers.
2069+'''
2070+
2071+from openerp.osv import orm, fields
2072+from openerp import netsvc
2073+
2074+
2075+class payment_manual(orm.TransientModel):
2076+ _name = 'payment.manual'
2077+ _description = 'Send payment order(s) manually'
2078+
2079+ _columns = {
2080+ 'payment_order_ids': fields.many2many('payment.order',
2081+ 'wiz_manual_payorders_rel', 'wizard_id', 'payment_order_id',
2082+ 'Payment orders', readonly=True),
2083+ }
2084+
2085+ def create(self, cr, uid, vals, context=None):
2086+ payment_order_ids = context.get('active_ids', [])
2087+ vals.update({
2088+ 'payment_order_ids': [[6, 0, payment_order_ids]],
2089+ })
2090+ return super(payment_manual, self).create(cr, uid,
2091+ vals, context=context)
2092+
2093+ def button_ok(self, cr, uid, ids, context=None):
2094+ wf_service = netsvc.LocalService('workflow')
2095+ for wiz in self.browse(cr, uid, ids, context=context):
2096+ for order_id in wiz.payment_order_ids:
2097+ wf_service.trg_validate(
2098+ uid, 'payment.order', order_id.id, 'done', cr)
2099+ return {'type': 'ir.actions.act_window_close'}
2100
2101=== added file 'account_payment_export/model/payment_mode.py'
2102--- account_payment_export/model/payment_mode.py 1970-01-01 00:00:00 +0000
2103+++ account_payment_export/model/payment_mode.py 2014-02-09 13:36:47 +0000
2104@@ -0,0 +1,44 @@
2105+# -*- coding: utf-8 -*-
2106+##############################################################################
2107+#
2108+# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
2109+# (C) 2011 - 2013 Therp BV (<http://therp.nl>).
2110+#
2111+# All other contributions are (C) by their respective contributors
2112+#
2113+# All Rights Reserved
2114+#
2115+# This program is free software: you can redistribute it and/or modify
2116+# it under the terms of the GNU Affero General Public License as
2117+# published by the Free Software Foundation, either version 3 of the
2118+# License, or (at your option) any later version.
2119+#
2120+# This program is distributed in the hope that it will be useful,
2121+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2122+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2123+# GNU Affero General Public License for more details.
2124+#
2125+# You should have received a copy of the GNU Affero General Public License
2126+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2127+#
2128+##############################################################################
2129+
2130+from openerp.osv import orm, fields
2131+
2132+
2133+class payment_mode(orm.Model):
2134+ ''' Restoring the payment type from version 5,
2135+ used to select the export wizard (if any) '''
2136+ _inherit = "payment.mode"
2137+
2138+ def suitable_bank_types(self, cr, uid, payment_mode_id=None, context=None):
2139+ """ Reinstates functional code for suitable bank type filtering.
2140+ Current code in account_payment is disfunctional.
2141+ """
2142+ res = []
2143+ payment_mode = self.browse(
2144+ cr, uid, payment_mode_id, context)
2145+ if (payment_mode and payment_mode.type and
2146+ payment_mode.type.suitable_bank_types):
2147+ res = [t.code for t in payment_mode.type.suitable_bank_types]
2148+ return res
2149
2150=== added file 'account_payment_export/model/payment_order_create.py'
2151--- account_payment_export/model/payment_order_create.py 1970-01-01 00:00:00 +0000
2152+++ account_payment_export/model/payment_order_create.py 2014-02-09 13:36:47 +0000
2153@@ -0,0 +1,58 @@
2154+# -*- coding: utf-8 -*-
2155+##############################################################################
2156+#
2157+# Copyright (C) 2013 ACSONE SA/NV (<http://acsone.eu>);.
2158+#
2159+# All other contributions are (C) by their respective contributors
2160+#
2161+# All Rights Reserved
2162+#
2163+# This program is free software: you can redistribute it and/or modify
2164+# it under the terms of the GNU Affero General Public License as
2165+# published by the Free Software Foundation, either version 3 of the
2166+# License, or (at your option) any later version.
2167+#
2168+# This program is distributed in the hope that it will be useful,
2169+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2170+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2171+# GNU Affero General Public License for more details.
2172+#
2173+# You should have received a copy of the GNU Affero General Public License
2174+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2175+#
2176+##############################################################################
2177+
2178+from openerp.osv import orm
2179+
2180+
2181+class payment_order_create(orm.TransientModel):
2182+ _inherit = 'payment.order.create'
2183+
2184+ def create_payment(self, cr, uid, ids, context=None):
2185+ '''This method adapts the core create_payment()
2186+ to pass the payment mode to line2bank() through the context,
2187+ so it is in turn propagated to suitable_bank_types().
2188+
2189+ This is necessary because the core does not propagate the payment mode to line2bank: t = None in
2190+ http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/account_payment/wizard/account_payment_order.py#L72
2191+
2192+ Hack idea courtesy Stefan Rijnhart.
2193+ '''
2194+ if context is None:
2195+ context = {}
2196+ order_obj = self.pool.get('payment.order')
2197+ payment = order_obj.browse(cr, uid, context['active_id'], context=context)
2198+ context['_fix_payment_mode_id'] = payment.mode.id
2199+ return super(payment_order_create, self).create_payment(cr, uid, ids, context=context)
2200+
2201+
2202+class account_move_line(orm.Model):
2203+ _inherit = 'account.move.line'
2204+
2205+ def line2bank(self, cr, uid, ids, payment_mode_id=None, context=None):
2206+ '''Obtain payment_type from context, see create_payment above'''
2207+ if context is None:
2208+ context = {}
2209+ payment_mode_id = payment_mode_id or context.get('_fix_payment_mode_id')
2210+ return super(account_move_line, self).line2bank(cr, uid, ids, payment_mode_id, context=context)
2211+
2212
2213=== added directory 'account_payment_export/view'
2214=== added file 'account_payment_export/view/account_payment.xml'
2215--- account_payment_export/view/account_payment.xml 1970-01-01 00:00:00 +0000
2216+++ account_payment_export/view/account_payment.xml 2014-02-09 13:36:47 +0000
2217@@ -0,0 +1,22 @@
2218+<?xml version="1.0" encoding="utf-8"?>
2219+<openerp>
2220+ <data>
2221+ <!-- restore wizard functionality when making payments
2222+ -->
2223+
2224+ <record id="view_banking_payment_order_form_1" model="ir.ui.view">
2225+ <field name="name">account.payment.order.form.banking-1</field>
2226+ <field name="inherit_id" ref="account_payment.view_payment_order_form" />
2227+ <field name="model">payment.order</field>
2228+ <field name="arch" type="xml">
2229+ <data>
2230+ <xpath expr="//button[@string='Make Payments']"
2231+ position="attributes">
2232+ <attribute name="name">launch_wizard</attribute>
2233+ </xpath>
2234+ </data>
2235+ </field>
2236+ </record>
2237+
2238+ </data>
2239+</openerp>
2240
2241=== added file 'account_payment_export/view/bank_payment_manual.xml'
2242--- account_payment_export/view/bank_payment_manual.xml 1970-01-01 00:00:00 +0000
2243+++ account_payment_export/view/bank_payment_manual.xml 2014-02-09 13:36:47 +0000
2244@@ -0,0 +1,18 @@
2245+<?xml version="1.0" encoding="utf-8"?>
2246+<openerp>
2247+ <data>
2248+ <record id="view_payment_manual_form" model="ir.ui.view">
2249+ <field name="name">Form for manual payment wizard</field>
2250+ <field name="model">payment.manual</field>
2251+ <field name="arch" type="xml">
2252+ <form string="Manual payment" version="7.0">
2253+ <label string="Please execute payment order manually, and click OK when succesfully sent."/>
2254+ <footer>
2255+ <button name="button_ok" type="object" string="OK" class="oe_highlight"/>
2256+ <button special="cancel" string="Cancel" class="oe_link"/>
2257+ </footer>
2258+ </form>
2259+ </field>
2260+ </record>
2261+ </data>
2262+</openerp>
2263
2264=== added file 'account_payment_export/view/payment_mode.xml'
2265--- account_payment_export/view/payment_mode.xml 1970-01-01 00:00:00 +0000
2266+++ account_payment_export/view/payment_mode.xml 2014-02-09 13:36:47 +0000
2267@@ -0,0 +1,31 @@
2268+<?xml version="1.0" encoding="utf-8"?>
2269+<openerp>
2270+ <data>
2271+
2272+ <!--
2273+ Add the payment mode type and transfer settings
2274+ -->
2275+ <record id="view_payment_mode_form_inherit" model="ir.ui.view">
2276+ <field name="name">payment.mode.form.inherit</field>
2277+ <field name="model">payment.mode</field>
2278+ <field name="inherit_id" ref="account_payment.view_payment_mode_form"/>
2279+ <field name="arch" type="xml">
2280+ <field name="company_id" position="after">
2281+ <field name="type"/>
2282+ </field>
2283+ </field>
2284+ </record>
2285+
2286+ <record id="view_payment_mode_tree_inherit" model="ir.ui.view">
2287+ <field name="name">payment.mode.tree.inherit</field>
2288+ <field name="model">payment.mode</field>
2289+ <field name="inherit_id" ref="account_payment.view_payment_mode_tree"/>
2290+ <field name="arch" type="xml">
2291+ <field name="company_id" position="after">
2292+ <field name="type"/>
2293+ </field>
2294+ </field>
2295+ </record>
2296+
2297+ </data>
2298+</openerp>
2299
2300=== added directory 'account_payment_pain_base'
2301=== added file 'account_payment_pain_base/.directory'
2302--- account_payment_pain_base/.directory 1970-01-01 00:00:00 +0000
2303+++ account_payment_pain_base/.directory 2014-02-09 13:36:47 +0000
2304@@ -0,0 +1,6 @@
2305+[Dolphin]
2306+SortOrder=1
2307+SortRole=date
2308+Timestamp=2014,1,23,11,48,11
2309+Version=3
2310+ViewMode=1
2311
2312=== added file 'account_payment_pain_base/__init__.py'
2313--- account_payment_pain_base/__init__.py 1970-01-01 00:00:00 +0000
2314+++ account_payment_pain_base/__init__.py 2014-02-09 13:36:47 +0000
2315@@ -0,0 +1,26 @@
2316+# -*- encoding: utf-8 -*-
2317+##############################################################################
2318+#
2319+# PAIN Base module for OpenERP
2320+# Copyright (C) 2013 Akretion (http://www.akretion.com)
2321+# @author: Alexis de Lattre <alexis.delattre@akretion.com>
2322+#
2323+# This program is free software: you can redistribute it and/or modify
2324+# it under the terms of the GNU Affero General Public License as
2325+# published by the Free Software Foundation, either version 3 of the
2326+# License, or (at your option) any later version.
2327+#
2328+# This program is distributed in the hope that it will be useful,
2329+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2330+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2331+# GNU Affero General Public License for more details.
2332+#
2333+# You should have received a copy of the GNU Affero General Public License
2334+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2335+#
2336+##############################################################################
2337+
2338+from . import payment_line
2339+from . import payment_mode
2340+from . import company
2341+from . import banking_export_pain
2342
2343=== added file 'account_payment_pain_base/__openerp__.py'
2344--- account_payment_pain_base/__openerp__.py 1970-01-01 00:00:00 +0000
2345+++ account_payment_pain_base/__openerp__.py 2014-02-09 13:36:47 +0000
2346@@ -0,0 +1,53 @@
2347+##############################################################################
2348+#
2349+# PAIN base module for OpenERP
2350+# Copyright (C) 2013 Akretion (http://www.akretion.com)
2351+# @author: Alexis de Lattre <alexis.delattre@akretion.com>
2352+# Copyright (C) 2014 Acysos S.L. (<http://acysos.com>).
2353+# @author: Ignacio Ibeas <ignacio@acysos.com>
2354+#
2355+# This program is free software: you can redistribute it and/or modify
2356+# it under the terms of the GNU Affero General Public License as
2357+# published by the Free Software Foundation, either version 3 of the
2358+# License, or (at your option) any later version.
2359+#
2360+# This program is distributed in the hope that it will be useful,
2361+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2362+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2363+# GNU Affero General Public License for more details.
2364+#
2365+# You should have received a copy of the GNU Affero General Public License
2366+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2367+#
2368+##############################################################################
2369+{
2370+ 'name': 'Account Payment PAIN Base Module',
2371+ 'summary': 'Base module for PAIN file generation',
2372+ 'version': '0.1',
2373+ 'license': 'AGPL-3',
2374+ 'author': 'Akretion, Noviat, Acysos',
2375+ 'website': 'http://openerp-community-association.org/',
2376+ 'category': 'Hidden',
2377+ 'depends': ['account_payment_extension','account_payment_export'],
2378+ 'external_dependencies': {
2379+ 'python': ['unidecode', 'lxml'],
2380+ },
2381+ 'data': [
2382+ 'payment_line_view.xml',
2383+ 'payment_mode_view.xml',
2384+ 'company_view.xml',
2385+ ],
2386+ 'description': '''
2387+Base module for PAIN file generation
2388+====================================
2389+
2390+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.
2391+
2392+This module is part of the banking addons: https://launchpad.net/account-payment
2393+
2394+This module was started during the Akretion-Noviat code sprint of November 21st 2013 in Epiais les Louvres (France).
2395+Adapted to account_payment_extension by Acysos S.L. <info@acysos.com>
2396+ ''',
2397+ 'active': False,
2398+ 'installable': True,
2399+}
2400
2401=== added file 'account_payment_pain_base/banking_export_pain.py'
2402--- account_payment_pain_base/banking_export_pain.py 1970-01-01 00:00:00 +0000
2403+++ account_payment_pain_base/banking_export_pain.py 2014-02-09 13:36:47 +0000
2404@@ -0,0 +1,439 @@
2405+# -*- encoding: utf-8 -*-
2406+##############################################################################
2407+#
2408+# PAIN Base module for OpenERP
2409+# Copyright (C) 2013 Akretion (http://www.akretion.com)
2410+# @author: Alexis de Lattre <alexis.delattre@akretion.com>
2411+#
2412+# This program is free software: you can redistribute it and/or modify
2413+# it under the terms of the GNU Affero General Public License as
2414+# published by the Free Software Foundation, either version 3 of the
2415+# License, or (at your option) any later version.
2416+#
2417+# This program is distributed in the hope that it will be useful,
2418+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2419+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2420+# GNU Affero General Public License for more details.
2421+#
2422+# You should have received a copy of the GNU Affero General Public License
2423+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2424+#
2425+##############################################################################
2426+
2427+from openerp.osv import orm
2428+from openerp.tools.translate import _
2429+from openerp.tools.safe_eval import safe_eval
2430+from datetime import datetime
2431+from unidecode import unidecode
2432+from lxml import etree
2433+from openerp import tools
2434+import logging
2435+import base64
2436+
2437+logger = logging.getLogger(__name__)
2438+
2439+
2440+class banking_export_pain(orm.AbstractModel):
2441+ _name = 'banking.export.pain'
2442+
2443+ def _validate_iban(self, cr, uid, iban, context=None):
2444+ '''if IBAN is valid, returns IBAN
2445+ if IBAN is NOT valid, raises an error message'''
2446+ partner_bank_obj = self.pool.get('res.partner.bank')
2447+ if partner_bank_obj.is_iban_valid(cr, uid, iban, context=context):
2448+ return iban.replace(' ', '')
2449+ else:
2450+ raise orm.except_orm(
2451+ _('Error:'), _("This IBAN is not valid : %s") % iban)
2452+
2453+ def _prepare_field(
2454+ self, cr, uid, field_name, field_value, eval_ctx, max_size=0,
2455+ gen_args=None, context=None):
2456+ '''This function is designed to be inherited !'''
2457+ if gen_args is None:
2458+ gen_args = {}
2459+ assert isinstance(eval_ctx, dict), 'eval_ctx must contain a dict'
2460+ try:
2461+ value = safe_eval(field_value, eval_ctx)
2462+ # SEPA uses XML ; XML = UTF-8 ; UTF-8 = support for all characters
2463+ # But we are dealing with banks...
2464+ # and many banks don't want non-ASCCI characters !
2465+ # cf section 1.4 "Character set" of the SEPA Credit Transfer
2466+ # Scheme Customer-to-bank guidelines
2467+ if gen_args.get('convert_to_ascii'):
2468+ value = unidecode(value)
2469+ unallowed_ascii_chars = [
2470+ '"', '#', '$', '%', '&', '*', ';', '<', '>', '=', '@',
2471+ '[', ']', '^', '_', '`', '{', '}', '|', '~', '\\', '!']
2472+ for unallowed_ascii_char in unallowed_ascii_chars:
2473+ value = value.replace(unallowed_ascii_char, '-')
2474+ except:
2475+ line = eval_ctx.get('line')
2476+ if line:
2477+ raise orm.except_orm(
2478+ _('Error:'),
2479+ _("Cannot compute the '%s' of the Payment Line with "
2480+ "reference '%s'.")
2481+ % (field_name, line.name))
2482+ else:
2483+ raise orm.except_orm(
2484+ _('Error:'),
2485+ _("Cannot compute the '%s'.") % field_name)
2486+ if not isinstance(value, (str, unicode)):
2487+ raise orm.except_orm(
2488+ _('Field type error:'),
2489+ _("The type of the field '%s' is %s. It should be a string "
2490+ "or unicode.")
2491+ % (field_name, type(value)))
2492+ if not value:
2493+ raise orm.except_orm(
2494+ _('Error:'),
2495+ _("The '%s' is empty or 0. It should have a non-null value.")
2496+ % field_name)
2497+ if max_size and len(value) > max_size:
2498+ value = value[0:max_size]
2499+ return value
2500+
2501+ def _prepare_export_sepa(
2502+ self, cr, uid, total_amount, transactions_count, xml_string,
2503+ gen_args, context=None):
2504+ return {
2505+ 'batch_booking': gen_args['sepa_export'].batch_booking,
2506+ 'charge_bearer': gen_args['sepa_export'].charge_bearer,
2507+ 'total_amount': total_amount,
2508+ 'nb_transactions': transactions_count,
2509+ 'file': base64.encodestring(xml_string),
2510+ 'payment_order_ids': [(
2511+ 6, 0, [x.id for x in gen_args['sepa_export'].payment_order_ids]
2512+ )],
2513+ }
2514+
2515+ def _validate_xml(self, cr, uid, xml_string, gen_args, context=None):
2516+ xsd_etree_obj = etree.parse(
2517+ tools.file_open(gen_args['pain_xsd_file']))
2518+ official_pain_schema = etree.XMLSchema(xsd_etree_obj)
2519+
2520+ try:
2521+ root_to_validate = etree.fromstring(xml_string)
2522+ official_pain_schema.assertValid(root_to_validate)
2523+ except Exception, e:
2524+ logger.warning(
2525+ "The XML file is invalid against the XML Schema Definition")
2526+ logger.warning(xml_string)
2527+ logger.warning(e)
2528+ raise orm.except_orm(
2529+ _('Error:'),
2530+ _("The generated XML file is not valid against the official "
2531+ "XML Schema Definition. The generated XML file and the "
2532+ "full error have been written in the server logs. Here "
2533+ "is the error, which may give you an idea on the cause "
2534+ "of the problem : %s")
2535+ % str(e))
2536+ return True
2537+
2538+ def finalize_sepa_file_creation(
2539+ self, cr, uid, ids, xml_root, total_amount, transactions_count,
2540+ gen_args, context=None):
2541+ xml_string = etree.tostring(
2542+ xml_root, pretty_print=True, encoding='UTF-8',
2543+ xml_declaration=True)
2544+ logger.debug(
2545+ "Generated SEPA XML file in format %s below"
2546+ % gen_args['pain_flavor'])
2547+ logger.debug(xml_string)
2548+ self._validate_xml(cr, uid, xml_string, gen_args, context=context)
2549+
2550+ file_id = gen_args['file_obj'].create(
2551+ cr, uid, self._prepare_export_sepa(
2552+ cr, uid, total_amount, transactions_count,
2553+ xml_string, gen_args, context=context),
2554+ context=context)
2555+
2556+ self.write(
2557+ cr, uid, ids, {
2558+ 'file_id': file_id,
2559+ 'state': 'finish',
2560+ }, context=context)
2561+
2562+ action = {
2563+ 'name': 'SEPA File',
2564+ 'type': 'ir.actions.act_window',
2565+ 'view_type': 'form',
2566+ 'view_mode': 'form,tree',
2567+ 'res_model': self._name,
2568+ 'res_id': ids[0],
2569+ 'target': 'new',
2570+ }
2571+ return action
2572+
2573+ def generate_group_header_block(
2574+ self, cr, uid, parent_node, gen_args, context=None):
2575+ group_header_1_0 = etree.SubElement(parent_node, 'GrpHdr')
2576+ message_identification_1_1 = etree.SubElement(
2577+ group_header_1_0, 'MsgId')
2578+ message_identification_1_1.text = self._prepare_field(
2579+ cr, uid, 'Message Identification',
2580+ 'sepa_export.payment_order_ids[0].reference',
2581+ {'sepa_export': gen_args['sepa_export']}, 35,
2582+ gen_args=gen_args, context=context)
2583+ creation_date_time_1_2 = etree.SubElement(group_header_1_0, 'CreDtTm')
2584+ creation_date_time_1_2.text = datetime.strftime(
2585+ datetime.today(), '%Y-%m-%dT%H:%M:%S')
2586+ if gen_args.get('pain_flavor') == 'pain.001.001.02':
2587+ # batch_booking is in "Group header" with pain.001.001.02
2588+ # and in "Payment info" in pain.001.001.03/04
2589+ batch_booking = etree.SubElement(group_header_1_0, 'BtchBookg')
2590+ batch_booking.text = \
2591+ str(gen_args['sepa_export'].batch_booking).lower()
2592+ nb_of_transactions_1_6 = etree.SubElement(
2593+ group_header_1_0, 'NbOfTxs')
2594+ control_sum_1_7 = etree.SubElement(group_header_1_0, 'CtrlSum')
2595+ # Grpg removed in pain.001.001.03
2596+ if gen_args.get('pain_flavor') == 'pain.001.001.02':
2597+ grouping = etree.SubElement(group_header_1_0, 'Grpg')
2598+ grouping.text = 'GRPD'
2599+ self.generate_initiating_party_block(
2600+ cr, uid, group_header_1_0, gen_args,
2601+ context=context)
2602+ return group_header_1_0, nb_of_transactions_1_6, control_sum_1_7
2603+
2604+ def generate_start_payment_info_block(
2605+ self, cr, uid, parent_node, payment_info_ident,
2606+ priority, local_instrument, sequence_type, requested_date,
2607+ eval_ctx, gen_args, context=None):
2608+ payment_info_2_0 = etree.SubElement(parent_node, 'PmtInf')
2609+ payment_info_identification_2_1 = etree.SubElement(
2610+ payment_info_2_0, 'PmtInfId')
2611+ payment_info_identification_2_1.text = self._prepare_field(
2612+ cr, uid, 'Payment Information Identification',
2613+ payment_info_ident, eval_ctx, 35,
2614+ gen_args=gen_args, context=context)
2615+ payment_method_2_2 = etree.SubElement(payment_info_2_0, 'PmtMtd')
2616+ payment_method_2_2.text = gen_args['payment_method']
2617+ if gen_args.get('pain_flavor') != 'pain.001.001.02':
2618+ batch_booking_2_3 = etree.SubElement(payment_info_2_0, 'BtchBookg')
2619+ batch_booking_2_3.text = \
2620+ str(gen_args['sepa_export'].batch_booking).lower()
2621+ # The "SEPA Customer-to-bank
2622+ # Implementation guidelines" for SCT and SDD says that control sum
2623+ # and nb_of_transactions should be present
2624+ # at both "group header" level and "payment info" level
2625+ nb_of_transactions_2_4 = etree.SubElement(
2626+ payment_info_2_0, 'NbOfTxs')
2627+ control_sum_2_5 = etree.SubElement(payment_info_2_0, 'CtrlSum')
2628+ payment_type_info_2_6 = etree.SubElement(
2629+ payment_info_2_0, 'PmtTpInf')
2630+ if priority:
2631+ instruction_priority_2_7 = etree.SubElement(
2632+ payment_type_info_2_6, 'InstrPrty')
2633+ instruction_priority_2_7.text = priority
2634+ service_level_2_8 = etree.SubElement(
2635+ payment_type_info_2_6, 'SvcLvl')
2636+ service_level_code_2_9 = etree.SubElement(service_level_2_8, 'Cd')
2637+ service_level_code_2_9.text = 'SEPA'
2638+ if local_instrument:
2639+ local_instrument_2_11 = etree.SubElement(
2640+ payment_type_info_2_6, 'LclInstrm')
2641+ local_instr_code_2_12 = etree.SubElement(
2642+ local_instrument_2_11, 'Cd')
2643+ local_instr_code_2_12.text = local_instrument
2644+ if sequence_type:
2645+ sequence_type_2_14 = etree.SubElement(
2646+ payment_type_info_2_6, 'SeqTp')
2647+ sequence_type_2_14.text = sequence_type
2648+
2649+ if gen_args['payment_method'] == 'DD':
2650+ request_date_tag = 'ReqdColltnDt'
2651+ else:
2652+ request_date_tag = 'ReqdExctnDt'
2653+ requested_date_2_17 = etree.SubElement(
2654+ payment_info_2_0, request_date_tag)
2655+ requested_date_2_17.text = requested_date
2656+ return payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5
2657+
2658+ def generate_initiating_party_block(
2659+ self, cr, uid, parent_node, gen_args, context=None):
2660+ my_company_name = self._prepare_field(
2661+ cr, uid, 'Company Name',
2662+ 'sepa_export.payment_order_ids[0].mode.bank_id.partner_id.name',
2663+ {'sepa_export': gen_args['sepa_export']},
2664+ gen_args.get('name_maxsize'), gen_args=gen_args, context=context)
2665+ initiating_party_1_8 = etree.SubElement(parent_node, 'InitgPty')
2666+ initiating_party_name = etree.SubElement(initiating_party_1_8, 'Nm')
2667+ initiating_party_name.text = my_company_name
2668+ initiating_party_identifier = self.pool['res.company'].\
2669+ _get_initiating_party_identifier(
2670+ cr, uid,
2671+ gen_args['sepa_export'].payment_order_ids[0].company_id.id,
2672+ context=context)
2673+ initiating_party_issuer = gen_args['sepa_export'].\
2674+ payment_order_ids[0].company_id.initiating_party_issuer
2675+ if initiating_party_identifier and initiating_party_issuer:
2676+ iniparty_id = etree.SubElement(initiating_party_1_8, 'Id')
2677+ iniparty_org_id = etree.SubElement(iniparty_id, 'OrgId')
2678+ iniparty_org_other = etree.SubElement(iniparty_org_id, 'Othr')
2679+ iniparty_org_other_id = etree.SubElement(iniparty_org_other, 'Id')
2680+ iniparty_org_other_id.text = initiating_party_identifier
2681+ iniparty_org_other_issuer = etree.SubElement(
2682+ iniparty_org_other, 'Issr')
2683+ iniparty_org_other_issuer.text = initiating_party_issuer
2684+ return True
2685+
2686+ def generate_party_agent(
2687+ self, cr, uid, parent_node, party_type, party_type_label,
2688+ order, party_name, iban, bic, eval_ctx, gen_args, context=None):
2689+ '''Generate the piece of the XML file corresponding to BIC
2690+ This code is mutualized between TRF and DD'''
2691+ assert order in ('B', 'C'), "Order can be 'B' or 'C'"
2692+ try:
2693+ bic = self._prepare_field(
2694+ cr, uid, '%s BIC' % party_type_label, bic, eval_ctx,
2695+ gen_args=gen_args, context=context)
2696+ party_agent = etree.SubElement(parent_node, '%sAgt' % party_type)
2697+ party_agent_institution = etree.SubElement(
2698+ party_agent, 'FinInstnId')
2699+ party_agent_bic = etree.SubElement(
2700+ party_agent_institution, gen_args.get('bic_xml_tag'))
2701+ party_agent_bic.text = bic
2702+ except except_orm:
2703+ if order == 'C':
2704+ if iban[0:2] != gen_args['initiating_party_country_code']:
2705+ raise orm.except_orm(
2706+ _('Error:'),
2707+ _("The bank account with IBAN '%s' of partner '%s' "
2708+ "must have an associated BIC because it is a "
2709+ "cross-border SEPA operation.")
2710+ % (iban, party_name))
2711+ if order == 'B' or (
2712+ order == 'C' and gen_args['payment_method'] == 'DD'):
2713+ party_agent = etree.SubElement(
2714+ parent_node, '%sAgt' % party_type)
2715+ party_agent_institution = etree.SubElement(
2716+ party_agent, 'FinInstnId')
2717+ party_agent_other = etree.SubElement(
2718+ party_agent_institution, 'Othr')
2719+ party_agent_other_identification = etree.SubElement(
2720+ party_agent_other, 'Id')
2721+ party_agent_other_identification.text = 'NOTPROVIDED'
2722+ # for Credit Transfers, in the 'C' block, if BIC is not provided,
2723+ # we should not put the 'Creditor Agent' block at all,
2724+ # as per the guidelines of the EPC
2725+ return True
2726+
2727+ def generate_party_block(
2728+ self, cr, uid, parent_node, party_type, order, name, iban, bic,
2729+ eval_ctx, gen_args, context=None):
2730+ '''Generate the piece of the XML file corresponding to Name+IBAN+BIC
2731+ This code is mutualized between TRF and DD'''
2732+ assert order in ('B', 'C'), "Order can be 'B' or 'C'"
2733+ if party_type == 'Cdtr':
2734+ party_type_label = 'Creditor'
2735+ elif party_type == 'Dbtr':
2736+ party_type_label = 'Debtor'
2737+ party_name = self._prepare_field(
2738+ cr, uid, '%s Name' % party_type_label, name, eval_ctx,
2739+ gen_args.get('name_maxsize'),
2740+ gen_args=gen_args, context=context)
2741+ piban = self._prepare_field(
2742+ cr, uid, '%s IBAN' % party_type_label, iban, eval_ctx,
2743+ gen_args=gen_args,
2744+ context=context)
2745+ viban = self._validate_iban(cr, uid, piban, context=context)
2746+ # At C level, the order is : BIC, Name, IBAN
2747+ # At B level, the order is : Name, IBAN, BIC
2748+ if order == 'B':
2749+ gen_args['initiating_party_country_code'] = viban[0:2]
2750+ elif order == 'C':
2751+ self.generate_party_agent(
2752+ cr, uid, parent_node, party_type, party_type_label,
2753+ order, party_name, viban, bic,
2754+ eval_ctx, gen_args, context=context)
2755+ party = etree.SubElement(parent_node, party_type)
2756+ party_nm = etree.SubElement(party, 'Nm')
2757+ party_nm.text = party_name
2758+ party_account = etree.SubElement(
2759+ parent_node, '%sAcct' % party_type)
2760+ party_account_id = etree.SubElement(party_account, 'Id')
2761+ party_account_iban = etree.SubElement(
2762+ party_account_id, 'IBAN')
2763+ party_account_iban.text = viban
2764+ if order == 'B':
2765+ self.generate_party_agent(
2766+ cr, uid, parent_node, party_type, party_type_label,
2767+ order, party_name, viban, bic,
2768+ eval_ctx, gen_args, context=context)
2769+ return True
2770+
2771+ def generate_remittance_info_block(
2772+ self, cr, uid, parent_node, line, gen_args, context=None):
2773+
2774+ remittance_info_2_91 = etree.SubElement(
2775+ parent_node, 'RmtInf')
2776+ if line.state == 'normal':
2777+ remittance_info_unstructured_2_99 = etree.SubElement(
2778+ remittance_info_2_91, 'Ustrd')
2779+ remittance_info_unstructured_2_99.text = \
2780+ self._prepare_field(
2781+ cr, uid, 'Remittance Unstructured Information',
2782+ 'line.communication', {'line': line}, 140,
2783+ gen_args=gen_args,
2784+ context=context)
2785+ else:
2786+ if not line.struct_communication_type:
2787+ raise orm.except_orm(
2788+ _('Error:'),
2789+ _("Missing 'Structured Communication Type' on payment "
2790+ "line with reference '%s'.")
2791+ % (line.name))
2792+ remittance_info_structured_2_100 = etree.SubElement(
2793+ remittance_info_2_91, 'Strd')
2794+ creditor_ref_information_2_120 = etree.SubElement(
2795+ remittance_info_structured_2_100, 'CdtrRefInf')
2796+ if gen_args.get('pain_flavor') == 'pain.001.001.02':
2797+ creditor_ref_info_type_2_121 = etree.SubElement(
2798+ creditor_ref_information_2_120, 'CdtrRefTp')
2799+ creditor_ref_info_type_code_2_123 = etree.SubElement(
2800+ creditor_ref_info_type_2_121, 'Cd')
2801+ creditor_ref_info_type_issuer_2_125 = etree.SubElement(
2802+ creditor_ref_info_type_2_121, 'Issr')
2803+ creditor_reference_2_126 = etree.SubElement(
2804+ creditor_ref_information_2_120, 'CdtrRef')
2805+ else:
2806+ creditor_ref_info_type_2_121 = etree.SubElement(
2807+ creditor_ref_information_2_120, 'Tp')
2808+ creditor_ref_info_type_or_2_122 = etree.SubElement(
2809+ creditor_ref_info_type_2_121, 'CdOrPrtry')
2810+ creditor_ref_info_type_code_2_123 = etree.SubElement(
2811+ creditor_ref_info_type_or_2_122, 'Cd')
2812+ creditor_ref_info_type_issuer_2_125 = etree.SubElement(
2813+ creditor_ref_info_type_2_121, 'Issr')
2814+ creditor_reference_2_126 = etree.SubElement(
2815+ creditor_ref_information_2_120, 'Ref')
2816+
2817+ creditor_ref_info_type_code_2_123.text = 'SCOR'
2818+ creditor_ref_info_type_issuer_2_125.text = \
2819+ line.struct_communication_type
2820+ creditor_reference_2_126.text = \
2821+ self._prepare_field(
2822+ cr, uid, 'Creditor Structured Reference',
2823+ 'line.communication', {'line': line}, 35,
2824+ gen_args=gen_args,
2825+ context=context)
2826+ return True
2827+
2828+ def generate_creditor_scheme_identification(
2829+ self, cr, uid, parent_node, identification, identification_label,
2830+ eval_ctx, scheme_name_proprietary, gen_args, context=None):
2831+ csi_id = etree.SubElement(
2832+ parent_node, 'Id')
2833+ csi_privateid = csi_id = etree.SubElement(csi_id, 'PrvtId')
2834+ csi_other = etree.SubElement(csi_privateid, 'Othr')
2835+ csi_other_id = etree.SubElement(csi_other, 'Id')
2836+ csi_other_id.text = self._prepare_field(
2837+ cr, uid, identification_label, identification, eval_ctx,
2838+ gen_args=gen_args, context=context)
2839+ csi_scheme_name = etree.SubElement(csi_other, 'SchmeNm')
2840+ csi_scheme_name_proprietary = etree.SubElement(
2841+ csi_scheme_name, 'Prtry')
2842+ csi_scheme_name_proprietary.text = scheme_name_proprietary
2843+ return True
2844
2845=== added file 'account_payment_pain_base/company.py'
2846--- account_payment_pain_base/company.py 1970-01-01 00:00:00 +0000
2847+++ account_payment_pain_base/company.py 2014-02-09 13:36:47 +0000
2848@@ -0,0 +1,78 @@
2849+# -*- encoding: utf-8 -*-
2850+##############################################################################
2851+#
2852+# PAIN Base module for OpenERP
2853+# Copyright (C) 2013 Akretion (http://www.akretion.com)
2854+# Copyright (C) 2013 Noviat (http://www.noviat.com)
2855+# @author: Alexis de Lattre <alexis.delattre@akretion.com>
2856+# @author: Luc de Meyer (Noviat)
2857+#
2858+# This program is free software: you can redistribute it and/or modify
2859+# it under the terms of the GNU Affero General Public License as
2860+# published by the Free Software Foundation, either version 3 of the
2861+# License, or (at your option) any later version.
2862+#
2863+# This program is distributed in the hope that it will be useful,
2864+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2865+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2866+# GNU Affero General Public License for more details.
2867+#
2868+# You should have received a copy of the GNU Affero General Public License
2869+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2870+#
2871+##############################################################################
2872+
2873+from openerp.osv import orm, fields
2874+
2875+
2876+class res_company(orm.Model):
2877+ _inherit = 'res.company'
2878+
2879+ _columns = {
2880+ 'initiating_party_issuer': fields.char(
2881+ 'Initiating Party Issuer', size=35,
2882+ help="This will be used as the 'Initiating Party Issuer' in the "
2883+ "PAIN files generated by OpenERP."),
2884+ }
2885+
2886+ def _get_initiating_party_identifier(
2887+ self, cr, uid, company_id, context=None):
2888+ '''The code here may be different from one country to another.
2889+ If you need to add support for an additionnal country, you can
2890+ contribute your code here or inherit this function in the
2891+ localization modules for your country'''
2892+ assert isinstance(company_id, int), 'Only one company ID'
2893+ company = self.browse(cr, uid, company_id, context=context)
2894+ company_vat = company.vat
2895+ party_identifier = False
2896+ if company_vat and company_vat[0:2].upper() in ['BE']:
2897+ party_identifier = company_vat[2:].replace(' ', '')
2898+ return party_identifier
2899+
2900+ def _initiating_party_issuer_default(self, cr, uid, context=None):
2901+ '''If you need to add support for an additionnal country, you can
2902+ add an entry in the dict "party_issuer_per_country" here
2903+ or inherit this function in the localization modules for
2904+ your country'''
2905+ initiating_party_issuer = ''
2906+ # If your country require the 'Initiating Party Issuer', you should
2907+ # contribute the entry for your country in the dict below
2908+ party_issuer_per_country = {
2909+ 'BE': 'KBO-BCE', # KBO-BCE = the registry of companies in Belgium
2910+ }
2911+ company_id = self._company_default_get(
2912+ cr, uid, 'res.company', context=context)
2913+ if company_id:
2914+ company = self.browse(cr, uid, company_id, context=context)
2915+ country_code = company.country_id.code
2916+ initiating_party_issuer = party_issuer_per_country.get(
2917+ country_code, '')
2918+ return initiating_party_issuer
2919+
2920+ def _initiating_party_issuer_def(self, cr, uid, context=None):
2921+ return self._initiating_party_issuer_default(
2922+ cr, uid, context=context)
2923+
2924+ _defaults = {
2925+ 'initiating_party_issuer': _initiating_party_issuer_def,
2926+ }
2927
2928=== added file 'account_payment_pain_base/company_view.xml'
2929--- account_payment_pain_base/company_view.xml 1970-01-01 00:00:00 +0000
2930+++ account_payment_pain_base/company_view.xml 2014-02-09 13:36:47 +0000
2931@@ -0,0 +1,24 @@
2932+<?xml version="1.0" encoding="utf-8"?>
2933+<!--
2934+ Copyright (C) 2013 Akretion (http://www.akretion.com)
2935+ @author: Alexis de Lattre <alexis.delattre@akretion.com>
2936+ The licence is in the file __openerp__.py
2937+-->
2938+<openerp>
2939+<data>
2940+
2941+<record id="view_company_form" model="ir.ui.view">
2942+ <field name="name">pain.group.on.res.company.form</field>
2943+ <field name="model">res.company</field>
2944+ <field name="inherit_id" ref="base.view_company_form"/>
2945+ <field name="arch" type="xml">
2946+ <group name="account_grp" position="after">
2947+ <group name="pain" string="Payment Initiation">
2948+ <field name="initiating_party_issuer"/>
2949+ </group>
2950+ </group>
2951+ </field>
2952+</record>
2953+
2954+</data>
2955+</openerp>
2956
2957=== added directory 'account_payment_pain_base/i18n'
2958=== added file 'account_payment_pain_base/i18n/account_banking_pain_base.pot'
2959--- account_payment_pain_base/i18n/account_banking_pain_base.pot 1970-01-01 00:00:00 +0000
2960+++ account_payment_pain_base/i18n/account_banking_pain_base.pot 2014-02-09 13:36:47 +0000
2961@@ -0,0 +1,146 @@
2962+# Translation of OpenERP Server.
2963+# This file contains the translation of the following modules:
2964+# * account_banking_pain_base
2965+#
2966+msgid ""
2967+msgstr ""
2968+"Project-Id-Version: OpenERP Server 7.0\n"
2969+"Report-Msgid-Bugs-To: \n"
2970+"POT-Creation-Date: 2013-12-23 21:26+0000\n"
2971+"PO-Revision-Date: 2013-12-23 21:26+0000\n"
2972+"Last-Translator: <>\n"
2973+"Language-Team: \n"
2974+"MIME-Version: 1.0\n"
2975+"Content-Type: text/plain; charset=UTF-8\n"
2976+"Content-Transfer-Encoding: \n"
2977+"Plural-Forms: \n"
2978+
2979+#. module: account_banking_pain_base
2980+#: field:res.company,initiating_party_issuer:0
2981+msgid "Initiating Party Issuer"
2982+msgstr ""
2983+
2984+#. module: account_banking_pain_base
2985+#: code:addons/account_banking_pain_base/banking_export_pain.py:122
2986+#, python-format
2987+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"
2988+msgstr ""
2989+
2990+#. module: account_banking_pain_base
2991+#: field:payment.line,priority:0
2992+msgid "Priority"
2993+msgstr ""
2994+
2995+#. module: account_banking_pain_base
2996+#: model:ir.model,name:account_banking_pain_base.model_payment_line
2997+msgid "Payment Line"
2998+msgstr ""
2999+
3000+#. module: account_banking_pain_base
3001+#: model:ir.model,name:account_banking_pain_base.model_payment_mode
3002+msgid "Payment Mode"
3003+msgstr ""
3004+
3005+#. module: account_banking_pain_base
3006+#: help:res.company,initiating_party_issuer:0
3007+msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
3008+msgstr ""
3009+
3010+#. module: account_banking_pain_base
3011+#: code:addons/account_banking_pain_base/banking_export_pain.py:351
3012+#, python-format
3013+msgid "Missing 'Structured Communication Type' on payment line with reference '%s'."
3014+msgstr ""
3015+
3016+#. module: account_banking_pain_base
3017+#: selection:payment.line,priority:0
3018+msgid "Normal"
3019+msgstr ""
3020+
3021+#. module: account_banking_pain_base
3022+#: code:addons/account_banking_pain_base/banking_export_pain.py:70
3023+#, python-format
3024+msgid "Cannot compute the '%s' of the Payment Line with reference '%s'."
3025+msgstr ""
3026+
3027+#. module: account_banking_pain_base
3028+#: code:addons/account_banking_pain_base/banking_export_pain.py:77
3029+#, python-format
3030+msgid "Cannot compute the '%s'."
3031+msgstr ""
3032+
3033+#. module: account_banking_pain_base
3034+#: code:addons/account_banking_pain_base/banking_export_pain.py:81
3035+#, python-format
3036+msgid "The type of the field '%s' is %s. It should be a string or unicode."
3037+msgstr ""
3038+
3039+#. module: account_banking_pain_base
3040+#: code:addons/account_banking_pain_base/banking_export_pain.py:47
3041+#: code:addons/account_banking_pain_base/banking_export_pain.py:69
3042+#: code:addons/account_banking_pain_base/banking_export_pain.py:76
3043+#: code:addons/account_banking_pain_base/banking_export_pain.py:86
3044+#: code:addons/account_banking_pain_base/banking_export_pain.py:121
3045+#: code:addons/account_banking_pain_base/banking_export_pain.py:350
3046+#, python-format
3047+msgid "Error:"
3048+msgstr ""
3049+
3050+#. module: account_banking_pain_base
3051+#: model:ir.model,name:account_banking_pain_base.model_res_company
3052+msgid "Companies"
3053+msgstr ""
3054+
3055+#. module: account_banking_pain_base
3056+#: code:addons/account_banking_pain_base/banking_export_pain.py:47
3057+#, python-format
3058+msgid "This IBAN is not valid : %s"
3059+msgstr ""
3060+
3061+#. module: account_banking_pain_base
3062+#: code:addons/account_banking_pain_base/banking_export_pain.py:80
3063+#, python-format
3064+msgid "Field type error:"
3065+msgstr ""
3066+
3067+#. module: account_banking_pain_base
3068+#: field:payment.line,struct_communication_type:0
3069+msgid "Structured Communication Type"
3070+msgstr ""
3071+
3072+#. module: account_banking_pain_base
3073+#: code:addons/account_banking_pain_base/banking_export_pain.py:87
3074+#, python-format
3075+msgid "The '%s' is empty or 0. It should have a non-null value."
3076+msgstr ""
3077+
3078+#. module: account_banking_pain_base
3079+#: model:ir.model,name:account_banking_pain_base.model_banking_export_pain
3080+msgid "banking.export.pain"
3081+msgstr ""
3082+
3083+#. module: account_banking_pain_base
3084+#: help:payment.mode,convert_to_ascii:0
3085+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."
3086+msgstr ""
3087+
3088+#. module: account_banking_pain_base
3089+#: help:payment.line,priority:0
3090+msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file."
3091+msgstr ""
3092+
3093+#. module: account_banking_pain_base
3094+#: view:res.company:0
3095+msgid "Payment Initiation"
3096+msgstr ""
3097+
3098+#. module: account_banking_pain_base
3099+#: selection:payment.line,priority:0
3100+msgid "High"
3101+msgstr ""
3102+
3103+#. module: account_banking_pain_base
3104+#: field:payment.mode,convert_to_ascii:0
3105+msgid "Convert to ASCII"
3106+msgstr ""
3107+
3108
3109=== added file 'account_payment_pain_base/i18n/es.po'
3110--- account_payment_pain_base/i18n/es.po 1970-01-01 00:00:00 +0000
3111+++ account_payment_pain_base/i18n/es.po 2014-02-09 13:36:47 +0000
3112@@ -0,0 +1,153 @@
3113+# Translation of OpenERP Server.
3114+# This file contains the translation of the following modules:
3115+# * account_payment_pain_base
3116+#
3117+msgid ""
3118+msgstr ""
3119+"Project-Id-Version: OpenERP Server 7.0-20131224-002412\n"
3120+"Report-Msgid-Bugs-To: \n"
3121+"POT-Creation-Date: 2014-01-25 11:28+0000\n"
3122+"PO-Revision-Date: 2014-01-25 11:28+0000\n"
3123+"Last-Translator: <>\n"
3124+"Language-Team: \n"
3125+"MIME-Version: 1.0\n"
3126+"Content-Type: text/plain; charset=UTF-8\n"
3127+"Content-Transfer-Encoding: \n"
3128+"Plural-Forms: \n"
3129+
3130+#. module: account_payment_pain_base
3131+#: field:res.company,initiating_party_issuer:0
3132+msgid "Initiating Party Issuer"
3133+msgstr "Initiating Party Issuer"
3134+
3135+#. module: account_payment_pain_base
3136+#: code:addons/account_payment_pain_base/banking_export_pain.py:126
3137+#, python-format
3138+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"
3139+msgstr "El archivo XML generado no es válido según el esquema oficial. El archivo XML generado y el error han sido escrito en el log del servidor. Aquí esta el error, que le puede indicar una idea del problema : %s"
3140+
3141+#. module: account_payment_pain_base
3142+#: field:payment.line,priority:0
3143+msgid "Priority"
3144+msgstr "Prioridad"
3145+
3146+#. module: account_payment_pain_base
3147+#: model:ir.model,name:account_payment_pain_base.model_payment_line
3148+msgid "Payment Line"
3149+msgstr "Línea de pago"
3150+
3151+#. module: account_payment_pain_base
3152+#: model:ir.model,name:account_payment_pain_base.model_payment_mode
3153+msgid "Payment Mode"
3154+msgstr "Modo de pago"
3155+
3156+#. module: account_payment_pain_base
3157+#: code:addons/account_payment_pain_base/banking_export_pain.py:303
3158+#, python-format
3159+msgid "The bank account with IBAN '%s' of partner '%s' must have an associated BIC because it is a cross-border SEPA operation."
3160+msgstr "La cuenta bancaria con IBAN '%s' de la empresa '%s' debe tener un BIC asociado porque es una operación SEPA transfronteriza."
3161+
3162+#. module: account_payment_pain_base
3163+#: help:res.company,initiating_party_issuer:0
3164+msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
3165+msgstr "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
3166+
3167+#. module: account_payment_pain_base
3168+#: selection:payment.line,priority:0
3169+msgid "Normal"
3170+msgstr "Normal"
3171+
3172+#. module: account_payment_pain_base
3173+#: code:addons/account_payment_pain_base/banking_export_pain.py:81
3174+#, python-format
3175+msgid "Cannot compute the '%s'."
3176+msgstr "No se puede computar el '%s'."
3177+
3178+#. module: account_payment_pain_base
3179+#: code:addons/account_payment_pain_base/banking_export_pain.py:85
3180+#, python-format
3181+msgid "The type of the field '%s' is %s. It should be a string or unicode."
3182+msgstr "El tipo de archivo '%s' es %s. Deben ser caracteres o unicode."
3183+
3184+#. module: account_payment_pain_base
3185+#: model:ir.model,name:account_payment_pain_base.model_res_company
3186+msgid "Companies"
3187+msgstr "Compañías"
3188+
3189+#. module: account_payment_pain_base
3190+#: code:addons/account_payment_pain_base/banking_export_pain.py:47
3191+#: code:addons/account_payment_pain_base/banking_export_pain.py:74
3192+#: code:addons/account_payment_pain_base/banking_export_pain.py:80
3193+#: code:addons/account_payment_pain_base/banking_export_pain.py:90
3194+#: code:addons/account_payment_pain_base/banking_export_pain.py:125
3195+#: code:addons/account_payment_pain_base/banking_export_pain.py:302
3196+#: code:addons/account_payment_pain_base/banking_export_pain.py:384
3197+#, python-format
3198+msgid "Error:"
3199+msgstr "Error:"
3200+
3201+#. module: account_payment_pain_base
3202+#: help:payment.line,priority:0
3203+msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file."
3204+msgstr "Este campo debe ser usuado como 'Instrucción prioritaria' en el archivo PAIN generado."
3205+
3206+#. module: account_payment_pain_base
3207+#: code:addons/account_payment_pain_base/banking_export_pain.py:75
3208+#, python-format
3209+msgid "Cannot compute the '%s' of the Payment Line with reference '%s'."
3210+msgstr "No se puede computar el '%s' de la línea de pago '%s'."
3211+
3212+#. module: account_payment_pain_base
3213+#: code:addons/account_payment_pain_base/banking_export_pain.py:47
3214+#, python-format
3215+msgid "This IBAN is not valid : %s"
3216+msgstr "Este IBAN no es válido : %s"
3217+
3218+#. module: account_payment_pain_base
3219+#: code:addons/account_payment_pain_base/banking_export_pain.py:84
3220+#, python-format
3221+msgid "Field type error:"
3222+msgstr "Error en el ripo de campo:"
3223+
3224+#. module: account_payment_pain_base
3225+#: field:payment.line,struct_communication_type:0
3226+msgid "Structured Communication Type"
3227+msgstr "Comunicación estructurada"
3228+
3229+#. module: account_payment_pain_base
3230+#: code:addons/account_payment_pain_base/banking_export_pain.py:91
3231+#, python-format
3232+msgid "The '%s' is empty or 0. It should have a non-null value."
3233+msgstr "Es '%s' esta vacio o es 0. Debe tener un valor no núlo."
3234+
3235+#. module: account_payment_pain_base
3236+#: model:ir.model,name:account_payment_pain_base.model_banking_export_pain
3237+msgid "banking.export.pain"
3238+msgstr "banking.export.pain"
3239+
3240+#. module: account_payment_pain_base
3241+#: help:payment.mode,convert_to_ascii:0
3242+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."
3243+msgstr "Si esta activo, OpenERP convertirá cada carácter acentuado en su correspondiente cáracter sin acentuar, solo se usan carácter ASCII el archivo PAIN."
3244+
3245+#. module: account_payment_pain_base
3246+#: view:res.company:0
3247+msgid "Payment Initiation"
3248+msgstr "Inicio de pago"
3249+
3250+#. module: account_payment_pain_base
3251+#: selection:payment.line,priority:0
3252+msgid "High"
3253+msgstr "Alto"
3254+
3255+#. module: account_payment_pain_base
3256+#: field:payment.mode,convert_to_ascii:0
3257+msgid "Convert to ASCII"
3258+msgstr "Convertir a ASCII"
3259+
3260+#. module: account_payment_pain_base
3261+#: code:addons/account_payment_pain_base/banking_export_pain.py:385
3262+#, python-format
3263+msgid "Missing 'Structured Communication Type' on payment line with reference '%s'."
3264+msgstr "'Comunicación estrecturada' no disponible en la línea de pago con referencia '%s'."
3265+
3266
3267=== added file 'account_payment_pain_base/i18n/fr.po'
3268--- account_payment_pain_base/i18n/fr.po 1970-01-01 00:00:00 +0000
3269+++ account_payment_pain_base/i18n/fr.po 2014-02-09 13:36:47 +0000
3270@@ -0,0 +1,146 @@
3271+# Translation of OpenERP Server.
3272+# This file contains the translation of the following modules:
3273+# * account_banking_pain_base
3274+#
3275+msgid ""
3276+msgstr ""
3277+"Project-Id-Version: OpenERP Server 7.0\n"
3278+"Report-Msgid-Bugs-To: \n"
3279+"POT-Creation-Date: 2013-12-23 21:27+0000\n"
3280+"PO-Revision-Date: 2013-12-23 21:27+0000\n"
3281+"Last-Translator: <>\n"
3282+"Language-Team: \n"
3283+"MIME-Version: 1.0\n"
3284+"Content-Type: text/plain; charset=UTF-8\n"
3285+"Content-Transfer-Encoding: \n"
3286+"Plural-Forms: \n"
3287+
3288+#. module: account_banking_pain_base
3289+#: field:res.company,initiating_party_issuer:0
3290+msgid "Initiating Party Issuer"
3291+msgstr "Initiating Party Issuer"
3292+
3293+#. module: account_banking_pain_base
3294+#: code:addons/account_banking_pain_base/banking_export_pain.py:122
3295+#, python-format
3296+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"
3297+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"
3298+
3299+#. module: account_banking_pain_base
3300+#: field:payment.line,priority:0
3301+msgid "Priority"
3302+msgstr "Priorité"
3303+
3304+#. module: account_banking_pain_base
3305+#: model:ir.model,name:account_banking_pain_base.model_payment_line
3306+msgid "Payment Line"
3307+msgstr "Ligne de paiement"
3308+
3309+#. module: account_banking_pain_base
3310+#: model:ir.model,name:account_banking_pain_base.model_payment_mode
3311+msgid "Payment Mode"
3312+msgstr "Mode de paiement"
3313+
3314+#. module: account_banking_pain_base
3315+#: help:res.company,initiating_party_issuer:0
3316+msgid "This will be used as the 'Initiating Party Issuer' in the PAIN files generated by OpenERP."
3317+msgstr "Ce champ sera le 'Initiating Party Issuer' dans les fichiers PAIN générés par OpenERP."
3318+
3319+#. module: account_banking_pain_base
3320+#: code:addons/account_banking_pain_base/banking_export_pain.py:351
3321+#, python-format
3322+msgid "Missing 'Structured Communication Type' on payment line with reference '%s'."
3323+msgstr "Le 'Type de communication structuré' n'est pas renseigné sur la ligne de paiement ayant la référence '%s'."
3324+
3325+#. module: account_banking_pain_base
3326+#: selection:payment.line,priority:0
3327+msgid "Normal"
3328+msgstr "Normal"
3329+
3330+#. module: account_banking_pain_base
3331+#: code:addons/account_banking_pain_base/banking_export_pain.py:70
3332+#, python-format
3333+msgid "Cannot compute the '%s' of the Payment Line with reference '%s'."
3334+msgstr "Impossible de calculer le '%s' de la ligne de paiement ayant la référence '%s'."
3335+
3336+#. module: account_banking_pain_base
3337+#: code:addons/account_banking_pain_base/banking_export_pain.py:77
3338+#, python-format
3339+msgid "Cannot compute the '%s'."
3340+msgstr "Impossible de calculer le '%s'."
3341+
3342+#. module: account_banking_pain_base
3343+#: code:addons/account_banking_pain_base/banking_export_pain.py:81
3344+#, python-format
3345+msgid "The type of the field '%s' is %s. It should be a string or unicode."
3346+msgstr "Le type du champ '%s' est %s. Il devrait être de type string ou unicode."
3347+
3348+#. module: account_banking_pain_base
3349+#: code:addons/account_banking_pain_base/banking_export_pain.py:47
3350+#: code:addons/account_banking_pain_base/banking_export_pain.py:69
3351+#: code:addons/account_banking_pain_base/banking_export_pain.py:76
3352+#: code:addons/account_banking_pain_base/banking_export_pain.py:86
3353+#: code:addons/account_banking_pain_base/banking_export_pain.py:121
3354+#: code:addons/account_banking_pain_base/banking_export_pain.py:350
3355+#, python-format
3356+msgid "Error:"
3357+msgstr "Erreur :"
3358+
3359+#. module: account_banking_pain_base
3360+#: model:ir.model,name:account_banking_pain_base.model_res_company
3361+msgid "Companies"
3362+msgstr "Sociétés"
3363+
3364+#. module: account_banking_pain_base
3365+#: code:addons/account_banking_pain_base/banking_export_pain.py:47
3366+#, python-format
3367+msgid "This IBAN is not valid : %s"
3368+msgstr "Cet IBAN n'est pas valide : %s"
3369+
3370+#. module: account_banking_pain_base
3371+#: code:addons/account_banking_pain_base/banking_export_pain.py:80
3372+#, python-format
3373+msgid "Field type error:"
3374+msgstr "Erreur dans le type de champ :"
3375+
3376+#. module: account_banking_pain_base
3377+#: field:payment.line,struct_communication_type:0
3378+msgid "Structured Communication Type"
3379+msgstr "Type de communication structurée"
3380+
3381+#. module: account_banking_pain_base
3382+#: code:addons/account_banking_pain_base/banking_export_pain.py:87
3383+#, python-format
3384+msgid "The '%s' is empty or 0. It should have a non-null value."
3385+msgstr "Le '%s' est vide ou égal à 0. Il devrait avoir une valeur non-nulle."
3386+
3387+#. module: account_banking_pain_base
3388+#: model:ir.model,name:account_banking_pain_base.model_banking_export_pain
3389+msgid "banking.export.pain"
3390+msgstr "banking.export.pain"
3391+
3392+#. module: account_banking_pain_base
3393+#: help:payment.mode,convert_to_ascii:0
3394+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."
3395+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é."
3396+
3397+#. module: account_banking_pain_base
3398+#: help:payment.line,priority:0
3399+msgid "This field will be used as the 'Instruction Priority' in the generated PAIN file."
3400+msgstr "Ce champ sera le 'Instruction Priority' dans le fichier PAIN généré."
3401+
3402+#. module: account_banking_pain_base
3403+#: view:res.company:0
3404+msgid "Payment Initiation"
3405+msgstr "Payment Initiation"
3406+
3407+#. module: account_banking_pain_base
3408+#: selection:payment.line,priority:0
3409+msgid "High"
3410+msgstr "Élevé"
3411+
3412+#. module: account_banking_pain_base
3413+#: field:payment.mode,convert_to_ascii:0
3414+msgid "Convert to ASCII"
3415+msgstr "Convertir en ASCII"
3416+
3417
3418=== added file 'account_payment_pain_base/payment_line.py'
3419--- account_payment_pain_base/payment_line.py 1970-01-01 00:00:00 +0000
3420+++ account_payment_pain_base/payment_line.py 2014-02-09 13:36:47 +0000
3421@@ -0,0 +1,52 @@
3422+# -*- encoding: utf-8 -*-
3423+##############################################################################
3424+#
3425+# PAIN Base module for OpenERP
3426+# Copyright (C) 2013 Akretion (http://www.akretion.com)
3427+# @author: Alexis de Lattre <alexis.delattre@akretion.com>
3428+#
3429+# This program is free software: you can redistribute it and/or modify
3430+# it under the terms of the GNU Affero General Public License as
3431+# published by the Free Software Foundation, either version 3 of the
3432+# License, or (at your option) any later version.
3433+#
3434+# This program is distributed in the hope that it will be useful,
3435+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3436+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3437+# GNU Affero General Public License for more details.
3438+#
3439+# You should have received a copy of the GNU Affero General Public License
3440+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3441+#
3442+##############################################################################
3443+
3444+from openerp.osv import orm, fields
3445+
3446+
3447+class payment_line(orm.Model):
3448+ _inherit = 'payment.line'
3449+
3450+ def _get_struct_communication_types(self, cr, uid, context=None):
3451+ return [('ISO', 'ISO')]
3452+
3453+ _columns = {
3454+ 'priority': fields.selection([
3455+ ('NORM', 'Normal'),
3456+ ('HIGH', 'High'),
3457+ ], 'Priority',
3458+ help="This field will be used as the 'Instruction Priority' in "
3459+ "the generated PAIN file."),
3460+ # Update size from 64 to 140, because PAIN allows 140 caracters
3461+ 'communication': fields.char(
3462+ 'Communication', size=140, required=True,
3463+ help="Used as the message between ordering customer and current "
3464+ "company. Depicts 'What do you want to say to the recipient "
3465+ "about this order ?'"),
3466+ 'struct_communication_type': fields.selection(
3467+ _get_struct_communication_types, 'Structured Communication Type'),
3468+ }
3469+
3470+ _defaults = {
3471+ 'priority': 'NORM',
3472+ 'struct_communication_type': 'ISO',
3473+ }
3474
3475=== added file 'account_payment_pain_base/payment_line_view.xml'
3476--- account_payment_pain_base/payment_line_view.xml 1970-01-01 00:00:00 +0000
3477+++ account_payment_pain_base/payment_line_view.xml 2014-02-09 13:36:47 +0000
3478@@ -0,0 +1,41 @@
3479+<?xml version="1.0" encoding="utf-8"?>
3480+<!--
3481+ Copyright (C) 2013 Akretion (http://www.akretion.com)
3482+ @author: Alexis de Lattre <alexis.delattre@akretion.com>
3483+ The licence is in the file __openerp__.py
3484+-->
3485+<openerp>
3486+<data>
3487+
3488+<record id="view_payment_line_form" model="ir.ui.view">
3489+ <field name="name">pain.base.payment.line.form</field>
3490+ <field name="model">payment.line</field>
3491+ <field name="inherit_id" ref="account_payment.view_payment_line_form"/>
3492+ <field name="arch" type="xml">
3493+ <field name="bank_id" position="after">
3494+ <field name="priority"/>
3495+ <newline />
3496+ </field>
3497+ <field name="state" position="after">
3498+ <field name="struct_communication_type" attrs="{'invisible': [('state', '!=', 'structured')], 'required': [('state', '=', 'structured')]}"/>
3499+ </field>
3500+ </field>
3501+</record>
3502+
3503+<record id="view_payment_order_form" model="ir.ui.view">
3504+ <field name="name">pain.base.payment.line.inside.order.form</field>
3505+ <field name="model">payment.order</field>
3506+ <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
3507+ <field name="arch" type="xml">
3508+ <xpath expr="//field[@name='line_ids']/form//field[@name='bank_id']" position="after">
3509+ <field name="priority"/>
3510+ <newline />
3511+ </xpath>
3512+ <xpath expr="//field[@name='line_ids']/form//field[@name='state']" position="after">
3513+ <field name="struct_communication_type" attrs="{'invisible': [('state', '!=', 'structured')], 'required': [('state', '=', 'structured')]}"/>
3514+ </xpath>
3515+ </field>
3516+</record>
3517+
3518+</data>
3519+</openerp>
3520
3521=== added file 'account_payment_pain_base/payment_mode.py'
3522--- account_payment_pain_base/payment_mode.py 1970-01-01 00:00:00 +0000
3523+++ account_payment_pain_base/payment_mode.py 2014-02-09 13:36:47 +0000
3524@@ -0,0 +1,39 @@
3525+# -*- encoding: utf-8 -*-
3526+##############################################################################
3527+#
3528+# PAIN Base module for OpenERP
3529+# Copyright (C) 2013 Akretion (http://www.akretion.com)
3530+# @author: Alexis de Lattre <alexis.delattre@akretion.com>
3531+#
3532+# This program is free software: you can redistribute it and/or modify
3533+# it under the terms of the GNU Affero General Public License as
3534+# published by the Free Software Foundation, either version 3 of the
3535+# License, or (at your option) any later version.
3536+#
3537+# This program is distributed in the hope that it will be useful,
3538+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3539+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3540+# GNU Affero General Public License for more details.
3541+#
3542+# You should have received a copy of the GNU Affero General Public License
3543+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3544+#
3545+##############################################################################
3546+
3547+from openerp.osv import orm, fields
3548+
3549+
3550+class payment_mode(orm.Model):
3551+ _inherit = 'payment.mode'
3552+
3553+ _columns = {
3554+ 'convert_to_ascii': fields.boolean(
3555+ 'Convert to ASCII',
3556+ help="If active, OpenERP will convert each accented caracter to "
3557+ "the corresponding unaccented caracter, so that only ASCII "
3558+ "caracters are used in the generated PAIN file."),
3559+ }
3560+
3561+ _defaults = {
3562+ 'convert_to_ascii': True,
3563+ }
3564
3565=== added file 'account_payment_pain_base/payment_mode_view.xml'
3566--- account_payment_pain_base/payment_mode_view.xml 1970-01-01 00:00:00 +0000
3567+++ account_payment_pain_base/payment_mode_view.xml 2014-02-09 13:36:47 +0000
3568@@ -0,0 +1,22 @@
3569+<?xml version="1.0" encoding="utf-8"?>
3570+<!--
3571+ Copyright (C) 2013 Akretion (http://www.akretion.com)
3572+ @author: Alexis de Lattre <alexis.delattre@akretion.com>
3573+ The licence is in the file __openerp__.py
3574+-->
3575+<openerp>
3576+<data>
3577+
3578+<record id="view_payment_mode_form_inherit" model="ir.ui.view">
3579+ <field name="name">add.convert_to_ascii.in.payment.mode.form</field>
3580+ <field name="model">payment.mode</field>
3581+ <field name="inherit_id" ref="account_payment_extension.view_payment_mode_form_require_bank_account"/>
3582+ <field name="arch" type="xml">
3583+ <field name="type" position="after">
3584+ <field name="convert_to_ascii"/>
3585+ </field>
3586+ </field>
3587+</record>
3588+
3589+</data>
3590+</openerp>
3591
3592=== added directory 'account_payment_sepa_credit_transfer'
3593=== added file 'account_payment_sepa_credit_transfer/__init__.py'
3594--- account_payment_sepa_credit_transfer/__init__.py 1970-01-01 00:00:00 +0000
3595+++ account_payment_sepa_credit_transfer/__init__.py 2014-02-09 13:36:47 +0000
3596@@ -0,0 +1,24 @@
3597+# -*- encoding: utf-8 -*-
3598+##############################################################################
3599+#
3600+# SEPA Credit Transfer module for OpenERP
3601+# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
3602+# @author: Alexis de Lattre <alexis.delattre@akretion.com>
3603+#
3604+# This program is free software: you can redistribute it and/or modify
3605+# it under the terms of the GNU Affero General Public License as
3606+# published by the Free Software Foundation, either version 3 of the
3607+# License, or (at your option) any later version.
3608+#
3609+# This program is distributed in the hope that it will be useful,
3610+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3611+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3612+# GNU Affero General Public License for more details.
3613+#
3614+# You should have received a copy of the GNU Affero General Public License
3615+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3616+#
3617+##############################################################################
3618+
3619+from . import wizard
3620+from . import account_banking_sepa
3621
3622=== added file 'account_payment_sepa_credit_transfer/__openerp__.py'
3623--- account_payment_sepa_credit_transfer/__openerp__.py 1970-01-01 00:00:00 +0000
3624+++ account_payment_sepa_credit_transfer/__openerp__.py 2014-02-09 13:36:47 +0000
3625@@ -0,0 +1,55 @@
3626+##############################################################################
3627+#
3628+# SEPA Credit Transfer module for OpenERP
3629+# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
3630+# @author: Alexis de Lattre <alexis.delattre@akretion.com>
3631+# Copyright (C) 2014 Acysos S.L. (<http://acysos.com>).
3632+# @author: Ignacio Ibeas <ignacio@acysos.com>
3633+#
3634+# This program is free software: you can redistribute it and/or modify
3635+# it under the terms of the GNU Affero General Public License as
3636+# published by the Free Software Foundation, either version 3 of the
3637+# License, or (at your option) any later version.
3638+#
3639+# This program is distributed in the hope that it will be useful,
3640+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3641+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3642+# GNU Affero General Public License for more details.
3643+#
3644+# You should have received a copy of the GNU Affero General Public License
3645+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3646+#
3647+##############################################################################
3648+{
3649+ 'name': 'Account Payment SEPA Credit Transfer',
3650+ 'summary': 'Create SEPA XML files for Credit Transfers',
3651+ 'version': '0.2',
3652+ 'license': 'AGPL-3',
3653+ 'author': 'Akretion',
3654+ 'website': 'http://www.akretion.com',
3655+ 'category': 'Banking addons',
3656+ 'depends': ['account_payment_pain_base'],
3657+ 'external_dependencies': {
3658+ 'python': ['unidecode', 'lxml'],
3659+ },
3660+ 'data': [
3661+ 'account_banking_sepa_view.xml',
3662+ 'wizard/export_sepa_view.xml',
3663+ 'data/payment_type_sepa_sct.xml',
3664+ 'security/ir.model.access.csv',
3665+ ],
3666+ 'description': '''
3667+Module to export payment orders in SEPA XML file format.
3668+
3669+SEPA PAIN (PAyment INitiation) is the new european standard for Customer-to-Bank payment instructions. This module implements SEPA Credit Transfer (SCT), more specifically PAIN versions 001.001.02, 001.001.03, 001.001.04 and 001.001.05. It is part of the ISO 20022 standard, available on http://www.iso20022.org.
3670+
3671+The Implementation Guidelines for SEPA Credit Transfer published by the European Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN version 001.001.03, so it's probably the version of PAIN that you should try first.
3672+
3673+This module uses the framework provided by the banking addons, cf https://launchpad.net/account-payment
3674+
3675+Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
3676+Adapted to account_payment_extension by Acysos S.L. <info@acysos.com>
3677+ ''',
3678+ 'active': False,
3679+ 'installable': True,
3680+}
3681
3682=== added file 'account_payment_sepa_credit_transfer/account_banking_sepa.py'
3683--- account_payment_sepa_credit_transfer/account_banking_sepa.py 1970-01-01 00:00:00 +0000
3684+++ account_payment_sepa_credit_transfer/account_banking_sepa.py 2014-02-09 13:36:47 +0000
3685@@ -0,0 +1,90 @@
3686+##############################################################################
3687+#
3688+# SEPA Credit Transfer module for OpenERP
3689+# Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
3690+# @author: Alexis de Lattre <alexis.delattre@akretion.com>
3691+#
3692+# This program is free software: you can redistribute it and/or modify
3693+# it under the terms of the GNU Affero General Public License as
3694+# published by the Free Software Foundation, either version 3 of the
3695+# License, or (at your option) any later version.
3696+#
3697+# This program is distributed in the hope that it will be useful,
3698+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3699+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3700+# GNU Affero General Public License for more details.
3701+#
3702+# You should have received a copy of the GNU Affero General Public License
3703+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3704+#
3705+##############################################################################
3706+
3707+from openerp.osv import orm, fields
3708+from openerp.addons.decimal_precision import decimal_precision as dp
3709+from unidecode import unidecode
3710+
3711+
3712+class banking_export_sepa(orm.Model):
3713+ '''SEPA export'''
3714+ _name = 'banking.export.sepa'
3715+ _description = __doc__
3716+ _rec_name = 'filename'
3717+
3718+ def _generate_filename(self, cr, uid, ids, name, arg, context=None):
3719+ res = {}
3720+ for sepa_file in self.browse(cr, uid, ids, context=context):
3721+ ref = sepa_file.payment_order_ids[0].reference
3722+ if ref:
3723+ label = unidecode(ref.replace('/', '-'))
3724+ else:
3725+ label = 'error'
3726+ res[sepa_file.id] = 'sct_%s.xml' % label
3727+ return res
3728+
3729+ _columns = {
3730+ 'payment_order_ids': fields.many2many(
3731+ 'payment.order',
3732+ 'account_payment_order_sepa_rel',
3733+ 'banking_export_sepa_id', 'account_order_id',
3734+ 'Payment Orders',
3735+ readonly=True),
3736+ 'nb_transactions': fields.integer(
3737+ 'Number of Transactions', readonly=True),
3738+ 'total_amount': fields.float(
3739+ 'Total Amount', digits_compute=dp.get_precision('Account'),
3740+ readonly=True),
3741+ 'batch_booking': fields.boolean(
3742+ 'Batch Booking', readonly=True,
3743+ help="If true, the bank statement will display only one debit "
3744+ "line for all the wire transfers of the SEPA XML file ; "
3745+ "if false, the bank statement will display one debit line "
3746+ "per wire transfer of the SEPA XML file."),
3747+ 'charge_bearer': fields.selection([
3748+ ('SLEV', 'Following Service Level'),
3749+ ('SHAR', 'Shared'),
3750+ ('CRED', 'Borne by Creditor'),
3751+ ('DEBT', 'Borne by Debtor'),
3752+ ], 'Charge Bearer', readonly=True,
3753+ help="Following service level : transaction charges are to be "
3754+ "applied following the rules agreed in the service level and/or "
3755+ "scheme (SEPA Core messages must use this). Shared : "
3756+ "transaction charges on the creditor side are to be borne by "
3757+ "the creditor, transaction charges on the debtor side are to "
3758+ "be borne by the debtor. Borne by creditor : all transaction "
3759+ "charges are to be borne by the creditor. Borne by debtor : "
3760+ "all transaction charges are to be borne by the debtor."),
3761+ 'create_date': fields.datetime('Generation Date', readonly=True),
3762+ 'file': fields.binary('SEPA XML File', readonly=True),
3763+ 'filename': fields.function(
3764+ _generate_filename, type='char', size=256, string='Filename',
3765+ readonly=True),
3766+ 'state': fields.selection([
3767+ ('draft', 'Draft'),
3768+ ('sent', 'Sent'),
3769+ ('done', 'Reconciled'),
3770+ ], 'State', readonly=True),
3771+ }
3772+
3773+ _defaults = {
3774+ 'state': 'draft',
3775+ }
3776
3777=== added file 'account_payment_sepa_credit_transfer/account_banking_sepa_view.xml'
3778--- account_payment_sepa_credit_transfer/account_banking_sepa_view.xml 1970-01-01 00:00:00 +0000
3779+++ account_payment_sepa_credit_transfer/account_banking_sepa_view.xml 2014-02-09 13:36:47 +0000
3780@@ -0,0 +1,80 @@
3781+<?xml version="1.0" encoding="utf-8"?>
3782+<!--
3783+ Copyright (C) 2010-2013 Akretion (http://www.akretion.com)
3784+ @author: Alexis de Lattre <alexis.delattre@akretion.com>
3785+ The licence is in the file __openerp__.py
3786+-->
3787+<openerp>
3788+<data>
3789+
3790+<record id="view_banking_export_sepa_form" model="ir.ui.view">
3791+ <field name="name">account.banking.export.sepa.form</field>
3792+ <field name="model">banking.export.sepa</field>
3793+ <field name="arch" type="xml">
3794+ <form string="SEPA Credit Transfer">
3795+ <notebook>
3796+ <page string="General Information">
3797+ <field name="total_amount" />
3798+ <field name="nb_transactions" />
3799+ <field name="batch_booking" />
3800+ <field name="charge_bearer"/>
3801+ <field name="create_date" />
3802+ <newline />
3803+ <field name="file" filename="filename"/>
3804+ <field name="filename" invisible="True"/>
3805+ </page>
3806+ <page string="Payment Orders">
3807+ <field name="payment_order_ids" colspan="4" nolabel="1">
3808+ <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment Orders">
3809+ <field name="reference"/>
3810+ <field name="date_created"/>
3811+ <field name="date_done"/>
3812+ <field name="total"/>
3813+ <field name="state"/>
3814+ </tree>
3815+ </field>
3816+ </page>
3817+ </notebook>
3818+ </form>
3819+ </field>
3820+</record>
3821+
3822+
3823+<record id="view_banking_export_sepa_tree" model="ir.ui.view">
3824+ <field name="name">account.banking.export.sepa.tree</field>
3825+ <field name="model">banking.export.sepa</field>
3826+ <field name="arch" type="xml">
3827+ <tree string="SEPA Credit Transfer">
3828+ <field name="filename"/>
3829+ <field name="create_date"/>
3830+ <field name="nb_transactions"/>
3831+ </tree>
3832+ </field>
3833+</record>
3834+
3835+
3836+<record id="action_account_banking_sepa" model="ir.actions.act_window">
3837+ <field name="name">SEPA Credit Transfer Files</field>
3838+ <field name="res_model">banking.export.sepa</field>
3839+ <field name="view_type">form</field>
3840+ <field name="view_mode">tree,form</field>
3841+</record>
3842+
3843+
3844+<menuitem id="menu_account_banking_sepa"
3845+ parent="account_payment.menu_main_payment"
3846+ action="action_account_banking_sepa"
3847+ sequence="15"
3848+ />
3849+
3850+<act_window id="act_banking_export_sepa_payment_order"
3851+ name="SEPA Credit Transfer Files"
3852+ domain="[('payment_order_ids', '=', active_id)]"
3853+ res_model="banking.export.sepa"
3854+ src_model="payment.order"
3855+ view_type="form"
3856+ view_mode="tree,form"
3857+/>
3858+
3859+</data>
3860+</openerp>
3861
3862=== added directory 'account_payment_sepa_credit_transfer/data'
3863=== added file 'account_payment_sepa_credit_transfer/data/pain.001.001.02.xsd'
3864--- account_payment_sepa_credit_transfer/data/pain.001.001.02.xsd 1970-01-01 00:00:00 +0000
3865+++ account_payment_sepa_credit_transfer/data/pain.001.001.02.xsd 2014-02-09 13:36:47 +0000
3866@@ -0,0 +1,784 @@
3867+<?xml version="1.0" encoding="UTF-8"?>
3868+<!--Generated by SWIFTStandards Workstation (build:R5.1.0.4) on 2006 Sep 08 11:58:39-->
3869+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">
3870+<xs:element name="Document" type="Document"/>
3871+<xs:complexType name="AccountIdentification3Choice">
3872+<xs:sequence>
3873+<xs:choice>
3874+<xs:element name="IBAN" type="IBANIdentifier"/>
3875+<xs:element name="BBAN" type="BBANIdentifier"/>
3876+<xs:element name="UPIC" type="UPICIdentifier"/>
3877+<xs:element name="PrtryAcct" type="SimpleIdentificationInformation2"/>
3878+</xs:choice>
3879+</xs:sequence>
3880+</xs:complexType>
3881+<xs:simpleType name="AddressType2Code">
3882+<xs:restriction base="xs:string">
3883+<xs:enumeration value="ADDR"/>
3884+<xs:enumeration value="PBOX"/>
3885+<xs:enumeration value="HOME"/>
3886+<xs:enumeration value="BIZZ"/>
3887+<xs:enumeration value="MLTO"/>
3888+<xs:enumeration value="DLVY"/>
3889+</xs:restriction>
3890+</xs:simpleType>
3891+<xs:complexType name="AmountType2Choice">
3892+<xs:sequence>
3893+<xs:choice>
3894+<xs:element name="InstdAmt" type="CurrencyAndAmount"/>
3895+<xs:element name="EqvtAmt" type="EquivalentAmount"/>
3896+</xs:choice>
3897+</xs:sequence>
3898+</xs:complexType>
3899+<xs:simpleType name="BBANIdentifier">
3900+<xs:restriction base="xs:string">
3901+<xs:pattern value="[a-zA-Z0-9]{1,30}"/>
3902+</xs:restriction>
3903+</xs:simpleType>
3904+<xs:simpleType name="BEIIdentifier">
3905+<xs:restriction base="xs:string">
3906+<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
3907+</xs:restriction>
3908+</xs:simpleType>
3909+<xs:simpleType name="BICIdentifier">
3910+<xs:restriction base="xs:string">
3911+<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
3912+</xs:restriction>
3913+</xs:simpleType>
3914+<xs:simpleType name="BaseOneRate">
3915+<xs:restriction base="xs:decimal">
3916+<xs:fractionDigits value="10"/>
3917+<xs:totalDigits value="11"/>
3918+</xs:restriction>
3919+</xs:simpleType>
3920+<xs:simpleType name="BatchBookingIndicator">
3921+<xs:restriction base="xs:boolean"/>
3922+</xs:simpleType>
3923+<xs:complexType name="BranchAndFinancialInstitutionIdentification3">
3924+<xs:sequence>
3925+<xs:element name="FinInstnId" type="FinancialInstitutionIdentification5Choice"/>
3926+<xs:element name="BrnchId" type="BranchData" minOccurs="0" maxOccurs="1"/>
3927+</xs:sequence>
3928+</xs:complexType>
3929+<xs:complexType name="BranchData">
3930+<xs:sequence>
3931+<xs:element name="Id" type="Max35Text" minOccurs="0" maxOccurs="1"/>
3932+<xs:element name="Nm" type="Max35Text" minOccurs="0" maxOccurs="1"/>
3933+<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
3934+</xs:sequence>
3935+</xs:complexType>
3936+<xs:simpleType name="CHIPSUniversalIdentifier">
3937+<xs:restriction base="xs:string">
3938+<xs:pattern value="CH[0-9]{6,6}"/>
3939+</xs:restriction>
3940+</xs:simpleType>
3941+<xs:complexType name="CashAccount7">
3942+<xs:sequence>
3943+<xs:element name="Id" type="AccountIdentification3Choice"/>
3944+<xs:element name="Tp" type="CashAccountType2" minOccurs="0" maxOccurs="1"/>
3945+<xs:element name="Ccy" type="CurrencyCode" minOccurs="0" maxOccurs="1"/>
3946+<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
3947+</xs:sequence>
3948+</xs:complexType>
3949+<xs:complexType name="CashAccountType2">
3950+<xs:sequence>
3951+<xs:choice>
3952+<xs:element name="Cd" type="CashAccountType4Code"/>
3953+<xs:element name="Prtry" type="Max35Text"/>
3954+</xs:choice>
3955+</xs:sequence>
3956+</xs:complexType>
3957+<xs:simpleType name="CashAccountType4Code">
3958+<xs:restriction base="xs:string">
3959+<xs:enumeration value="CASH"/>
3960+<xs:enumeration value="CHAR"/>
3961+<xs:enumeration value="COMM"/>
3962+<xs:enumeration value="TAXE"/>
3963+<xs:enumeration value="CISH"/>
3964+<xs:enumeration value="TRAS"/>
3965+<xs:enumeration value="SACC"/>
3966+<xs:enumeration value="CACC"/>
3967+<xs:enumeration value="SVGS"/>
3968+<xs:enumeration value="ONDP"/>
3969+<xs:enumeration value="MGLD"/>
3970+<xs:enumeration value="NREX"/>
3971+<xs:enumeration value="MOMA"/>
3972+<xs:enumeration value="LOAN"/>
3973+<xs:enumeration value="SLRY"/>
3974+<xs:enumeration value="ODFT"/>
3975+</xs:restriction>
3976+</xs:simpleType>
3977+<xs:simpleType name="ChargeBearerType1Code">
3978+<xs:restriction base="xs:string">
3979+<xs:enumeration value="DEBT"/>
3980+<xs:enumeration value="CRED"/>
3981+<xs:enumeration value="SHAR"/>
3982+<xs:enumeration value="SLEV"/>
3983+</xs:restriction>
3984+</xs:simpleType>
3985+<xs:complexType name="Cheque5">
3986+<xs:sequence>
3987+<xs:element name="ChqTp" type="ChequeType2Code" minOccurs="0" maxOccurs="1"/>
3988+<xs:element name="ChqNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
3989+<xs:element name="ChqFr" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
3990+<xs:element name="DlvryMtd" type="ChequeDeliveryMethod1Choice" minOccurs="0" maxOccurs="1"/>
3991+<xs:element name="DlvrTo" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
3992+<xs:element name="InstrPrty" type="Priority2Code" minOccurs="0" maxOccurs="1"/>
3993+<xs:element name="ChqMtrtyDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
3994+<xs:element name="FrmsCd" type="Max35Text" minOccurs="0" maxOccurs="1"/>
3995+<xs:element name="MemoFld" type="Max35Text" minOccurs="0" maxOccurs="1"/>
3996+<xs:element name="RgnlClrZone" type="Max35Text" minOccurs="0" maxOccurs="1"/>
3997+<xs:element name="PrtLctn" type="Max35Text" minOccurs="0" maxOccurs="1"/>
3998+</xs:sequence>
3999+</xs:complexType>
4000+<xs:simpleType name="ChequeDelivery1Code">
4001+<xs:restriction base="xs:string">
4002+<xs:enumeration value="MLDB"/>
4003+<xs:enumeration value="MLCD"/>
4004+<xs:enumeration value="MLFA"/>
4005+<xs:enumeration value="CRDB"/>
4006+<xs:enumeration value="CRCD"/>
4007+<xs:enumeration value="CRFA"/>
4008+<xs:enumeration value="PUDB"/>
4009+<xs:enumeration value="PUCD"/>
4010+<xs:enumeration value="PUFA"/>
4011+<xs:enumeration value="RGDB"/>
4012+<xs:enumeration value="RGCD"/>
4013+<xs:enumeration value="RGFA"/>
4014+</xs:restriction>
4015+</xs:simpleType>
4016+<xs:complexType name="ChequeDeliveryMethod1Choice">
4017+<xs:sequence>
4018+<xs:choice>
4019+<xs:element name="Cd" type="ChequeDelivery1Code"/>
4020+<xs:element name="Prtry" type="Max35Text"/>
4021+</xs:choice>
4022+</xs:sequence>
4023+</xs:complexType>
4024+<xs:simpleType name="ChequeType2Code">
4025+<xs:restriction base="xs:string">
4026+<xs:enumeration value="CCHQ"/>
4027+<xs:enumeration value="CCCH"/>
4028+<xs:enumeration value="BCHQ"/>
4029+<xs:enumeration value="DRFT"/>
4030+<xs:enumeration value="ELDR"/>
4031+</xs:restriction>
4032+</xs:simpleType>
4033+<xs:simpleType name="ClearingChannel2Code">
4034+<xs:restriction base="xs:string">
4035+<xs:enumeration value="RTGS"/>
4036+<xs:enumeration value="RTNS"/>
4037+<xs:enumeration value="MPNS"/>
4038+<xs:enumeration value="BOOK"/>
4039+</xs:restriction>
4040+</xs:simpleType>
4041+<xs:complexType name="ClearingSystemMemberIdentification3Choice">
4042+<xs:sequence>
4043+<xs:choice>
4044+<xs:element name="Id" type="ExternalClearingSystemMemberCode"/>
4045+<xs:element name="Prtry" type="Max35Text"/>
4046+</xs:choice>
4047+</xs:sequence>
4048+</xs:complexType>
4049+<xs:simpleType name="CountryCode">
4050+<xs:restriction base="xs:string">
4051+<xs:pattern value="[A-Z]{2,2}"/>
4052+</xs:restriction>
4053+</xs:simpleType>
4054+<xs:complexType name="CreditTransferTransactionInformation1">
4055+<xs:sequence>
4056+<xs:element name="PmtId" type="PaymentIdentification1"/>
4057+<xs:element name="PmtTpInf" type="PaymentTypeInformation1" minOccurs="0" maxOccurs="1"/>
4058+<xs:element name="Amt" type="AmountType2Choice"/>
4059+<xs:element name="XchgRateInf" type="ExchangeRateInformation1" minOccurs="0" maxOccurs="1"/>
4060+<xs:element name="ChrgBr" type="ChargeBearerType1Code" minOccurs="0" maxOccurs="1"/>
4061+<xs:element name="ChqInstr" type="Cheque5" minOccurs="0" maxOccurs="1"/>
4062+<xs:element name="UltmtDbtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
4063+<xs:element name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
4064+<xs:element name="IntrmyAgt1Acct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
4065+<xs:element name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
4066+<xs:element name="IntrmyAgt2Acct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
4067+<xs:element name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
4068+<xs:element name="IntrmyAgt3Acct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
4069+<xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
4070+<xs:element name="CdtrAgtAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
4071+<xs:element name="Cdtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
4072+<xs:element name="CdtrAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
4073+<xs:element name="UltmtCdtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
4074+<xs:element name="InstrForCdtrAgt" type="InstructionForCreditorAgent1" minOccurs="0" maxOccurs="unbounded"/>
4075+<xs:element name="InstrForDbtrAgt" type="Max140Text" minOccurs="0" maxOccurs="1"/>
4076+<xs:element name="Purp" type="Purpose1Choice" minOccurs="0" maxOccurs="1"/>
4077+<xs:element name="RgltryRptg" type="RegulatoryReporting2" minOccurs="0" maxOccurs="10"/>
4078+<xs:element name="Tax" type="TaxInformation2" minOccurs="0" maxOccurs="1"/>
4079+<xs:element name="RltdRmtInf" type="RemittanceLocation1" minOccurs="0" maxOccurs="10"/>
4080+<xs:element name="RmtInf" type="RemittanceInformation1" minOccurs="0" maxOccurs="1"/>
4081+</xs:sequence>
4082+</xs:complexType>
4083+<xs:complexType name="CreditorReferenceInformation1">
4084+<xs:sequence>
4085+<xs:element name="CdtrRefTp" type="CreditorReferenceType1" minOccurs="0" maxOccurs="1"/>
4086+<xs:element name="CdtrRef" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4087+</xs:sequence>
4088+</xs:complexType>
4089+<xs:complexType name="CreditorReferenceType1">
4090+<xs:sequence>
4091+<xs:choice>
4092+<xs:element name="Cd" type="DocumentType3Code"/>
4093+<xs:element name="Prtry" type="Max35Text"/>
4094+</xs:choice>
4095+<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4096+</xs:sequence>
4097+</xs:complexType>
4098+<xs:simpleType name="CurrencyAndAmount_SimpleType">
4099+<xs:restriction base="xs:decimal">
4100+<xs:minInclusive value="0"/>
4101+<xs:fractionDigits value="5"/>
4102+<xs:totalDigits value="18"/>
4103+</xs:restriction>
4104+</xs:simpleType>
4105+<xs:complexType name="CurrencyAndAmount">
4106+<xs:simpleContent>
4107+<xs:extension base="CurrencyAndAmount_SimpleType">
4108+<xs:attribute name="Ccy" type="CurrencyCode" use="required"/>
4109+</xs:extension>
4110+</xs:simpleContent>
4111+</xs:complexType>
4112+<xs:simpleType name="CurrencyCode">
4113+<xs:restriction base="xs:string">
4114+<xs:pattern value="[A-Z]{3,3}"/>
4115+</xs:restriction>
4116+</xs:simpleType>
4117+<xs:complexType name="DateAndPlaceOfBirth">
4118+<xs:sequence>
4119+<xs:element name="BirthDt" type="ISODate"/>
4120+<xs:element name="PrvcOfBirth" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4121+<xs:element name="CityOfBirth" type="Max35Text"/>
4122+<xs:element name="CtryOfBirth" type="CountryCode"/>
4123+</xs:sequence>
4124+</xs:complexType>
4125+<xs:simpleType name="DecimalNumber">
4126+<xs:restriction base="xs:decimal">
4127+<xs:fractionDigits value="17"/>
4128+<xs:totalDigits value="18"/>
4129+</xs:restriction>
4130+</xs:simpleType>
4131+<xs:complexType name="Document">
4132+<xs:sequence>
4133+<xs:element name="pain.001.001.02" type="pain.001.001.02"/>
4134+</xs:sequence>
4135+</xs:complexType>
4136+<xs:simpleType name="DocumentType2Code">
4137+<xs:restriction base="xs:string">
4138+<xs:enumeration value="MSIN"/>
4139+<xs:enumeration value="CNFA"/>
4140+<xs:enumeration value="DNFA"/>
4141+<xs:enumeration value="CINV"/>
4142+<xs:enumeration value="CREN"/>
4143+<xs:enumeration value="DEBN"/>
4144+<xs:enumeration value="HIRI"/>
4145+<xs:enumeration value="SBIN"/>
4146+<xs:enumeration value="CMCN"/>
4147+<xs:enumeration value="SOAC"/>
4148+<xs:enumeration value="DISP"/>
4149+</xs:restriction>
4150+</xs:simpleType>
4151+<xs:simpleType name="DocumentType3Code">
4152+<xs:restriction base="xs:string">
4153+<xs:enumeration value="RADM"/>
4154+<xs:enumeration value="RPIN"/>
4155+<xs:enumeration value="FXDR"/>
4156+<xs:enumeration value="DISP"/>
4157+<xs:enumeration value="PUOR"/>
4158+<xs:enumeration value="SCOR"/>
4159+</xs:restriction>
4160+</xs:simpleType>
4161+<xs:simpleType name="DunsIdentifier">
4162+<xs:restriction base="xs:string">
4163+<xs:pattern value="[0-9]{9,9}"/>
4164+</xs:restriction>
4165+</xs:simpleType>
4166+<xs:simpleType name="EANGLNIdentifier">
4167+<xs:restriction base="xs:string">
4168+<xs:pattern value="[0-9]{13,13}"/>
4169+</xs:restriction>
4170+</xs:simpleType>
4171+<xs:complexType name="EquivalentAmount">
4172+<xs:sequence>
4173+<xs:element name="Amt" type="CurrencyAndAmount"/>
4174+<xs:element name="CcyOfTrf" type="CurrencyCode"/>
4175+</xs:sequence>
4176+</xs:complexType>
4177+<xs:complexType name="ExchangeRateInformation1">
4178+<xs:sequence>
4179+<xs:element name="XchgRate" type="BaseOneRate" minOccurs="0" maxOccurs="1"/>
4180+<xs:element name="RateTp" type="ExchangeRateType1Code" minOccurs="0" maxOccurs="1"/>
4181+<xs:element name="CtrctId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4182+</xs:sequence>
4183+</xs:complexType>
4184+<xs:simpleType name="ExchangeRateType1Code">
4185+<xs:restriction base="xs:string">
4186+<xs:enumeration value="SPOT"/>
4187+<xs:enumeration value="SALE"/>
4188+<xs:enumeration value="AGRD"/>
4189+</xs:restriction>
4190+</xs:simpleType>
4191+<xs:simpleType name="ExternalClearingSystemMemberCode">
4192+<xs:restriction base="xs:string">
4193+<xs:minLength value="1"/>
4194+<xs:maxLength value="35"/>
4195+</xs:restriction>
4196+</xs:simpleType>
4197+<xs:simpleType name="ExternalLocalInstrumentCode">
4198+<xs:restriction base="xs:string">
4199+<xs:minLength value="1"/>
4200+<xs:maxLength value="35"/>
4201+</xs:restriction>
4202+</xs:simpleType>
4203+<xs:simpleType name="ExternalPurposeCode">
4204+<xs:restriction base="xs:string">
4205+<xs:minLength value="1"/>
4206+<xs:maxLength value="35"/>
4207+</xs:restriction>
4208+</xs:simpleType>
4209+<xs:complexType name="FinancialInstitutionIdentification3">
4210+<xs:sequence>
4211+<xs:element name="BIC" type="BICIdentifier" minOccurs="0" maxOccurs="1"/>
4212+<xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification3Choice" minOccurs="0" maxOccurs="1"/>
4213+<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
4214+<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
4215+<xs:element name="PrtryId" type="GenericIdentification3" minOccurs="0" maxOccurs="1"/>
4216+</xs:sequence>
4217+</xs:complexType>
4218+<xs:complexType name="FinancialInstitutionIdentification5Choice">
4219+<xs:sequence>
4220+<xs:choice>
4221+<xs:element name="BIC" type="BICIdentifier"/>
4222+<xs:element name="ClrSysMmbId" type="ClearingSystemMemberIdentification3Choice"/>
4223+<xs:element name="NmAndAdr" type="NameAndAddress7"/>
4224+<xs:element name="PrtryId" type="GenericIdentification3"/>
4225+<xs:element name="CmbndId" type="FinancialInstitutionIdentification3"/>
4226+</xs:choice>
4227+</xs:sequence>
4228+</xs:complexType>
4229+<xs:complexType name="GenericIdentification3">
4230+<xs:sequence>
4231+<xs:element name="Id" type="Max35Text"/>
4232+<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4233+</xs:sequence>
4234+</xs:complexType>
4235+<xs:complexType name="GenericIdentification4">
4236+<xs:sequence>
4237+<xs:element name="Id" type="Max35Text"/>
4238+<xs:element name="IdTp" type="Max35Text"/>
4239+</xs:sequence>
4240+</xs:complexType>
4241+<xs:complexType name="GroupHeader1">
4242+<xs:sequence>
4243+<xs:element name="MsgId" type="Max35Text"/>
4244+<xs:element name="CreDtTm" type="ISODateTime"/>
4245+<xs:element name="Authstn" type="Max128Text" minOccurs="0" maxOccurs="2"/>
4246+<xs:element name="BtchBookg" type="BatchBookingIndicator" minOccurs="0" maxOccurs="1"/>
4247+<xs:element name="NbOfTxs" type="Max15NumericText"/>
4248+<xs:element name="CtrlSum" type="DecimalNumber" minOccurs="0" maxOccurs="1"/>
4249+<xs:element name="Grpg" type="Grouping1Code"/>
4250+<xs:element name="InitgPty" type="PartyIdentification8"/>
4251+<xs:element name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
4252+</xs:sequence>
4253+</xs:complexType>
4254+<xs:simpleType name="Grouping1Code">
4255+<xs:restriction base="xs:string">
4256+<xs:enumeration value="SNGL"/>
4257+<xs:enumeration value="GRPD"/>
4258+<xs:enumeration value="MIXD"/>
4259+</xs:restriction>
4260+</xs:simpleType>
4261+<xs:simpleType name="IBANIdentifier">
4262+<xs:restriction base="xs:string">
4263+<xs:pattern value="[a-zA-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
4264+</xs:restriction>
4265+</xs:simpleType>
4266+<xs:simpleType name="IBEIIdentifier">
4267+<xs:restriction base="xs:string">
4268+<xs:pattern value="[A-Z]{2,2}[B-DF-HJ-NP-TV-XZ0-9]{7,7}[0-9]{1,1}"/>
4269+</xs:restriction>
4270+</xs:simpleType>
4271+<xs:simpleType name="ISODate">
4272+<xs:restriction base="xs:date"/>
4273+</xs:simpleType>
4274+<xs:simpleType name="ISODateTime">
4275+<xs:restriction base="xs:dateTime"/>
4276+</xs:simpleType>
4277+<xs:simpleType name="Instruction3Code">
4278+<xs:restriction base="xs:string">
4279+<xs:enumeration value="CHQB"/>
4280+<xs:enumeration value="HOLD"/>
4281+<xs:enumeration value="PHOB"/>
4282+<xs:enumeration value="TELB"/>
4283+</xs:restriction>
4284+</xs:simpleType>
4285+<xs:complexType name="InstructionForCreditorAgent1">
4286+<xs:sequence>
4287+<xs:element name="Cd" type="Instruction3Code" minOccurs="0" maxOccurs="1"/>
4288+<xs:element name="InstrInf" type="Max140Text" minOccurs="0" maxOccurs="1"/>
4289+</xs:sequence>
4290+</xs:complexType>
4291+<xs:complexType name="LocalInstrument1Choice">
4292+<xs:sequence>
4293+<xs:choice>
4294+<xs:element name="Cd" type="ExternalLocalInstrumentCode"/>
4295+<xs:element name="Prtry" type="Max35Text"/>
4296+</xs:choice>
4297+</xs:sequence>
4298+</xs:complexType>
4299+<xs:simpleType name="Max128Text">
4300+<xs:restriction base="xs:string">
4301+<xs:minLength value="1"/>
4302+<xs:maxLength value="128"/>
4303+</xs:restriction>
4304+</xs:simpleType>
4305+<xs:simpleType name="Max140Text">
4306+<xs:restriction base="xs:string">
4307+<xs:minLength value="1"/>
4308+<xs:maxLength value="140"/>
4309+</xs:restriction>
4310+</xs:simpleType>
4311+<xs:simpleType name="Max15NumericText">
4312+<xs:restriction base="xs:string">
4313+<xs:pattern value="[0-9]{1,15}"/>
4314+</xs:restriction>
4315+</xs:simpleType>
4316+<xs:simpleType name="Max16Text">
4317+<xs:restriction base="xs:string">
4318+<xs:minLength value="1"/>
4319+<xs:maxLength value="16"/>
4320+</xs:restriction>
4321+</xs:simpleType>
4322+<xs:simpleType name="Max256Text">
4323+<xs:restriction base="xs:string">
4324+<xs:minLength value="1"/>
4325+<xs:maxLength value="256"/>
4326+</xs:restriction>
4327+</xs:simpleType>
4328+<xs:simpleType name="Max34Text">
4329+<xs:restriction base="xs:string">
4330+<xs:minLength value="1"/>
4331+<xs:maxLength value="34"/>
4332+</xs:restriction>
4333+</xs:simpleType>
4334+<xs:simpleType name="Max35Text">
4335+<xs:restriction base="xs:string">
4336+<xs:minLength value="1"/>
4337+<xs:maxLength value="35"/>
4338+</xs:restriction>
4339+</xs:simpleType>
4340+<xs:simpleType name="Max3Text">
4341+<xs:restriction base="xs:string">
4342+<xs:minLength value="1"/>
4343+<xs:maxLength value="3"/>
4344+</xs:restriction>
4345+</xs:simpleType>
4346+<xs:simpleType name="Max70Text">
4347+<xs:restriction base="xs:string">
4348+<xs:minLength value="1"/>
4349+<xs:maxLength value="70"/>
4350+</xs:restriction>
4351+</xs:simpleType>
4352+<xs:complexType name="NameAndAddress3">
4353+<xs:sequence>
4354+<xs:element name="Nm" type="Max70Text"/>
4355+<xs:element name="Adr" type="PostalAddress1"/>
4356+</xs:sequence>
4357+</xs:complexType>
4358+<xs:complexType name="NameAndAddress7">
4359+<xs:sequence>
4360+<xs:element name="Nm" type="Max70Text"/>
4361+<xs:element name="PstlAdr" type="PostalAddress1"/>
4362+</xs:sequence>
4363+</xs:complexType>
4364+<xs:complexType name="OrganisationIdentification2">
4365+<xs:sequence>
4366+<xs:element name="BIC" type="BICIdentifier" minOccurs="0" maxOccurs="1"/>
4367+<xs:element name="IBEI" type="IBEIIdentifier" minOccurs="0" maxOccurs="1"/>
4368+<xs:element name="BEI" type="BEIIdentifier" minOccurs="0" maxOccurs="1"/>
4369+<xs:element name="EANGLN" type="EANGLNIdentifier" minOccurs="0" maxOccurs="1"/>
4370+<xs:element name="USCHU" type="CHIPSUniversalIdentifier" minOccurs="0" maxOccurs="1"/>
4371+<xs:element name="DUNS" type="DunsIdentifier" minOccurs="0" maxOccurs="1"/>
4372+<xs:element name="BkPtyId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4373+<xs:element name="TaxIdNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4374+<xs:element name="PrtryId" type="GenericIdentification3" minOccurs="0" maxOccurs="1"/>
4375+</xs:sequence>
4376+</xs:complexType>
4377+<xs:complexType name="Party2Choice">
4378+<xs:sequence>
4379+<xs:choice>
4380+<xs:element name="OrgId" type="OrganisationIdentification2"/>
4381+<xs:element name="PrvtId" type="PersonIdentification3" minOccurs="1" maxOccurs="4"/>
4382+</xs:choice>
4383+</xs:sequence>
4384+</xs:complexType>
4385+<xs:complexType name="PartyIdentification8">
4386+<xs:sequence>
4387+<xs:element name="Nm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
4388+<xs:element name="PstlAdr" type="PostalAddress1" minOccurs="0" maxOccurs="1"/>
4389+<xs:element name="Id" type="Party2Choice" minOccurs="0" maxOccurs="1"/>
4390+<xs:element name="CtryOfRes" type="CountryCode" minOccurs="0" maxOccurs="1"/>
4391+</xs:sequence>
4392+</xs:complexType>
4393+<xs:simpleType name="PaymentCategoryPurpose1Code">
4394+<xs:restriction base="xs:string">
4395+<xs:enumeration value="CORT"/>
4396+<xs:enumeration value="SALA"/>
4397+<xs:enumeration value="TREA"/>
4398+<xs:enumeration value="CASH"/>
4399+<xs:enumeration value="DIVI"/>
4400+<xs:enumeration value="GOVT"/>
4401+<xs:enumeration value="INTE"/>
4402+<xs:enumeration value="LOAN"/>
4403+<xs:enumeration value="PENS"/>
4404+<xs:enumeration value="SECU"/>
4405+<xs:enumeration value="SSBE"/>
4406+<xs:enumeration value="SUPP"/>
4407+<xs:enumeration value="TAXS"/>
4408+<xs:enumeration value="TRAD"/>
4409+<xs:enumeration value="VATX"/>
4410+<xs:enumeration value="HEDG"/>
4411+<xs:enumeration value="INTC"/>
4412+<xs:enumeration value="WHLD"/>
4413+</xs:restriction>
4414+</xs:simpleType>
4415+<xs:complexType name="PaymentIdentification1">
4416+<xs:sequence>
4417+<xs:element name="InstrId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4418+<xs:element name="EndToEndId" type="Max35Text"/>
4419+</xs:sequence>
4420+</xs:complexType>
4421+<xs:complexType name="PaymentInstructionInformation1">
4422+<xs:sequence>
4423+<xs:element name="PmtInfId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4424+<xs:element name="PmtMtd" type="PaymentMethod3Code"/>
4425+<xs:element name="PmtTpInf" type="PaymentTypeInformation1" minOccurs="0" maxOccurs="1"/>
4426+<xs:element name="ReqdExctnDt" type="ISODate"/>
4427+<xs:element name="PoolgAdjstmntDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
4428+<xs:element name="Dbtr" type="PartyIdentification8"/>
4429+<xs:element name="DbtrAcct" type="CashAccount7"/>
4430+<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification3"/>
4431+<xs:element name="DbtrAgtAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
4432+<xs:element name="UltmtDbtr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
4433+<xs:element name="ChrgBr" type="ChargeBearerType1Code" minOccurs="0" maxOccurs="1"/>
4434+<xs:element name="ChrgsAcct" type="CashAccount7" minOccurs="0" maxOccurs="1"/>
4435+<xs:element name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification3" minOccurs="0" maxOccurs="1"/>
4436+<xs:element name="CdtTrfTxInf" type="CreditTransferTransactionInformation1" minOccurs="1" maxOccurs="unbounded"/>
4437+</xs:sequence>
4438+</xs:complexType>
4439+<xs:simpleType name="PaymentMethod3Code">
4440+<xs:restriction base="xs:string">
4441+<xs:enumeration value="CHK"/>
4442+<xs:enumeration value="TRF"/>
4443+<xs:enumeration value="TRA"/>
4444+</xs:restriction>
4445+</xs:simpleType>
4446+<xs:complexType name="PaymentTypeInformation1">
4447+<xs:sequence>
4448+<xs:element name="InstrPrty" type="Priority2Code" minOccurs="0" maxOccurs="1"/>
4449+<xs:choice>
4450+<xs:element name="SvcLvl" type="ServiceLevel2Choice" minOccurs="0" maxOccurs="1"/>
4451+<xs:element name="ClrChanl" type="ClearingChannel2Code" minOccurs="0" maxOccurs="1"/>
4452+</xs:choice>
4453+<xs:element name="LclInstrm" type="LocalInstrument1Choice" minOccurs="0" maxOccurs="1"/>
4454+<xs:element name="CtgyPurp" type="PaymentCategoryPurpose1Code" minOccurs="0" maxOccurs="1"/>
4455+</xs:sequence>
4456+</xs:complexType>
4457+<xs:simpleType name="PercentageRate">
4458+<xs:restriction base="xs:decimal">
4459+<xs:fractionDigits value="10"/>
4460+<xs:totalDigits value="11"/>
4461+</xs:restriction>
4462+</xs:simpleType>
4463+<xs:complexType name="PersonIdentification3">
4464+<xs:sequence>
4465+<xs:choice>
4466+<xs:element name="DrvrsLicNb" type="Max35Text"/>
4467+<xs:element name="CstmrNb" type="Max35Text"/>
4468+<xs:element name="SclSctyNb" type="Max35Text"/>
4469+<xs:element name="AlnRegnNb" type="Max35Text"/>
4470+<xs:element name="PsptNb" type="Max35Text"/>
4471+<xs:element name="TaxIdNb" type="Max35Text"/>
4472+<xs:element name="IdntyCardNb" type="Max35Text"/>
4473+<xs:element name="MplyrIdNb" type="Max35Text"/>
4474+<xs:element name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
4475+<xs:element name="OthrId" type="GenericIdentification4"/>
4476+</xs:choice>
4477+<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4478+</xs:sequence>
4479+</xs:complexType>
4480+<xs:complexType name="PostalAddress1">
4481+<xs:sequence>
4482+<xs:element name="AdrTp" type="AddressType2Code" minOccurs="0" maxOccurs="1"/>
4483+<xs:element name="AdrLine" type="Max70Text" minOccurs="0" maxOccurs="5"/>
4484+<xs:element name="StrtNm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
4485+<xs:element name="BldgNb" type="Max16Text" minOccurs="0" maxOccurs="1"/>
4486+<xs:element name="PstCd" type="Max16Text" minOccurs="0" maxOccurs="1"/>
4487+<xs:element name="TwnNm" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4488+<xs:element name="CtrySubDvsn" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4489+<xs:element name="Ctry" type="CountryCode"/>
4490+</xs:sequence>
4491+</xs:complexType>
4492+<xs:simpleType name="Priority2Code">
4493+<xs:restriction base="xs:string">
4494+<xs:enumeration value="HIGH"/>
4495+<xs:enumeration value="NORM"/>
4496+</xs:restriction>
4497+</xs:simpleType>
4498+<xs:complexType name="Purpose1Choice">
4499+<xs:sequence>
4500+<xs:choice>
4501+<xs:element name="Cd" type="ExternalPurposeCode"/>
4502+<xs:element name="Prtry" type="Max35Text"/>
4503+</xs:choice>
4504+</xs:sequence>
4505+</xs:complexType>
4506+<xs:complexType name="ReferredDocumentAmount1Choice">
4507+<xs:sequence>
4508+<xs:choice>
4509+<xs:element name="DuePyblAmt" type="CurrencyAndAmount"/>
4510+<xs:element name="DscntApldAmt" type="CurrencyAndAmount"/>
4511+<xs:element name="RmtdAmt" type="CurrencyAndAmount"/>
4512+<xs:element name="CdtNoteAmt" type="CurrencyAndAmount"/>
4513+<xs:element name="TaxAmt" type="CurrencyAndAmount"/>
4514+</xs:choice>
4515+</xs:sequence>
4516+</xs:complexType>
4517+<xs:complexType name="ReferredDocumentInformation1">
4518+<xs:sequence>
4519+<xs:element name="RfrdDocTp" type="ReferredDocumentType1" minOccurs="0" maxOccurs="1"/>
4520+<xs:element name="RfrdDocNb" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4521+</xs:sequence>
4522+</xs:complexType>
4523+<xs:complexType name="ReferredDocumentType1">
4524+<xs:sequence>
4525+<xs:choice>
4526+<xs:element name="Cd" type="DocumentType2Code"/>
4527+<xs:element name="Prtry" type="Max35Text"/>
4528+</xs:choice>
4529+<xs:element name="Issr" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4530+</xs:sequence>
4531+</xs:complexType>
4532+<xs:complexType name="RegulatoryAuthority">
4533+<xs:sequence>
4534+<xs:element name="AuthrtyNm" type="Max70Text" minOccurs="0" maxOccurs="1"/>
4535+<xs:element name="AuthrtyCtry" type="CountryCode" minOccurs="0" maxOccurs="1"/>
4536+</xs:sequence>
4537+</xs:complexType>
4538+<xs:complexType name="RegulatoryReporting2">
4539+<xs:sequence>
4540+<xs:element name="DbtCdtRptgInd" type="RegulatoryReportingType1Code" minOccurs="0" maxOccurs="1"/>
4541+<xs:element name="Authrty" type="RegulatoryAuthority" minOccurs="0" maxOccurs="1"/>
4542+<xs:element name="RgltryDtls" type="StructuredRegulatoryReporting2" minOccurs="0" maxOccurs="1"/>
4543+</xs:sequence>
4544+</xs:complexType>
4545+<xs:simpleType name="RegulatoryReportingType1Code">
4546+<xs:restriction base="xs:string">
4547+<xs:enumeration value="CRED"/>
4548+<xs:enumeration value="DEBT"/>
4549+<xs:enumeration value="BOTH"/>
4550+</xs:restriction>
4551+</xs:simpleType>
4552+<xs:complexType name="RemittanceInformation1">
4553+<xs:sequence>
4554+<xs:element name="Ustrd" type="Max140Text" minOccurs="0" maxOccurs="unbounded"/>
4555+<xs:element name="Strd" type="StructuredRemittanceInformation6" minOccurs="0" maxOccurs="unbounded"/>
4556+</xs:sequence>
4557+</xs:complexType>
4558+<xs:complexType name="RemittanceLocation1">
4559+<xs:sequence>
4560+<xs:element name="RmtId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4561+<xs:element name="RmtLctnMtd" type="RemittanceLocationMethod1Code" minOccurs="0" maxOccurs="1"/>
4562+<xs:element name="RmtLctnElctrncAdr" type="Max256Text" minOccurs="0" maxOccurs="1"/>
4563+<xs:element name="RmtLctnPstlAdr" type="NameAndAddress3" minOccurs="0" maxOccurs="1"/>
4564+</xs:sequence>
4565+</xs:complexType>
4566+<xs:simpleType name="RemittanceLocationMethod1Code">
4567+<xs:restriction base="xs:string">
4568+<xs:enumeration value="FAXI"/>
4569+<xs:enumeration value="EDIC"/>
4570+<xs:enumeration value="URID"/>
4571+<xs:enumeration value="EMAL"/>
4572+<xs:enumeration value="POST"/>
4573+</xs:restriction>
4574+</xs:simpleType>
4575+<xs:simpleType name="ServiceLevel1Code">
4576+<xs:restriction base="xs:string">
4577+<xs:enumeration value="SEPA"/>
4578+<xs:enumeration value="SDVA"/>
4579+<xs:enumeration value="PRPT"/>
4580+</xs:restriction>
4581+</xs:simpleType>
4582+<xs:complexType name="ServiceLevel2Choice">
4583+<xs:sequence>
4584+<xs:choice>
4585+<xs:element name="Cd" type="ServiceLevel1Code"/>
4586+<xs:element name="Prtry" type="Max35Text"/>
4587+</xs:choice>
4588+</xs:sequence>
4589+</xs:complexType>
4590+<xs:complexType name="SimpleIdentificationInformation2">
4591+<xs:sequence>
4592+<xs:element name="Id" type="Max34Text"/>
4593+</xs:sequence>
4594+</xs:complexType>
4595+<xs:complexType name="StructuredRegulatoryReporting2">
4596+<xs:sequence>
4597+<xs:element name="Cd" type="Max3Text" minOccurs="0" maxOccurs="1"/>
4598+<xs:element name="Amt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
4599+<xs:element name="Inf" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4600+</xs:sequence>
4601+</xs:complexType>
4602+<xs:complexType name="StructuredRemittanceInformation6">
4603+<xs:sequence>
4604+<xs:element name="RfrdDocInf" type="ReferredDocumentInformation1" minOccurs="0" maxOccurs="1"/>
4605+<xs:element name="RfrdDocRltdDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
4606+<xs:element name="RfrdDocAmt" type="ReferredDocumentAmount1Choice" minOccurs="0" maxOccurs="unbounded"/>
4607+<xs:element name="CdtrRefInf" type="CreditorReferenceInformation1" minOccurs="0" maxOccurs="1"/>
4608+<xs:element name="Invcr" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
4609+<xs:element name="Invcee" type="PartyIdentification8" minOccurs="0" maxOccurs="1"/>
4610+<xs:element name="AddtlRmtInf" type="Max140Text" minOccurs="0" maxOccurs="1"/>
4611+</xs:sequence>
4612+</xs:complexType>
4613+<xs:complexType name="TaxDetails">
4614+<xs:sequence>
4615+<xs:element name="CertId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4616+<xs:element name="TaxTp" type="TaxType" minOccurs="0" maxOccurs="1"/>
4617+</xs:sequence>
4618+</xs:complexType>
4619+<xs:complexType name="TaxInformation2">
4620+<xs:sequence>
4621+<xs:element name="CdtrTaxId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4622+<xs:element name="CdtrTaxTp" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4623+<xs:element name="DbtrTaxId" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4624+<xs:element name="TaxRefNb" type="Max140Text" minOccurs="0" maxOccurs="1"/>
4625+<xs:element name="TtlTaxblBaseAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
4626+<xs:element name="TtlTaxAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
4627+<xs:element name="TaxDt" type="ISODate" minOccurs="0" maxOccurs="1"/>
4628+<xs:element name="TaxTpInf" type="TaxDetails" minOccurs="0" maxOccurs="unbounded"/>
4629+</xs:sequence>
4630+</xs:complexType>
4631+<xs:complexType name="TaxType">
4632+<xs:sequence>
4633+<xs:element name="CtgyDesc" type="Max35Text" minOccurs="0" maxOccurs="1"/>
4634+<xs:element name="Rate" type="PercentageRate" minOccurs="0" maxOccurs="1"/>
4635+<xs:element name="TaxblBaseAmt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
4636+<xs:element name="Amt" type="CurrencyAndAmount" minOccurs="0" maxOccurs="1"/>
4637+</xs:sequence>
4638+</xs:complexType>
4639+<xs:simpleType name="UPICIdentifier">
4640+<xs:restriction base="xs:string">
4641+<xs:pattern value="[0-9]{8,17}"/>
4642+</xs:restriction>
4643+</xs:simpleType>
4644+<xs:complexType name="pain.001.001.02">
4645+<xs:sequence>
4646+<xs:element name="GrpHdr" type="GroupHeader1"/>
4647+<xs:element name="PmtInf" type="PaymentInstructionInformation1" minOccurs="1" maxOccurs="unbounded"/>
4648+</xs:sequence>
4649+</xs:complexType>
4650+</xs:schema>
4651
4652=== added file 'account_payment_sepa_credit_transfer/data/pain.001.001.03.xsd'
4653--- account_payment_sepa_credit_transfer/data/pain.001.001.03.xsd 1970-01-01 00:00:00 +0000
4654+++ account_payment_sepa_credit_transfer/data/pain.001.001.03.xsd 2014-02-09 13:36:47 +0000
4655@@ -0,0 +1,921 @@
4656+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4657+<!--Generated by SWIFTStandards Workstation (build:R6.1.0.2) on 2009 Jan 08 17:30:53-->
4658+<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03">
4659+ <xs:element name="Document" type="Document"/>
4660+ <xs:complexType name="AccountIdentification4Choice">
4661+ <xs:sequence>
4662+ <xs:choice>
4663+ <xs:element name="IBAN" type="IBAN2007Identifier"/>
4664+ <xs:element name="Othr" type="GenericAccountIdentification1"/>
4665+ </xs:choice>
4666+ </xs:sequence>
4667+ </xs:complexType>
4668+ <xs:complexType name="AccountSchemeName1Choice">
4669+ <xs:sequence>
4670+ <xs:choice>
4671+ <xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
4672+ <xs:element name="Prtry" type="Max35Text"/>
4673+ </xs:choice>
4674+ </xs:sequence>
4675+ </xs:complexType>
4676+ <xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
4677+ <xs:restriction base="xs:decimal">
4678+ <xs:minInclusive value="0"/>
4679+ <xs:fractionDigits value="5"/>
4680+ <xs:totalDigits value="18"/>
4681+ </xs:restriction>
4682+ </xs:simpleType>
4683+ <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
4684+ <xs:simpleContent>
4685+ <xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
4686+ <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
4687+ </xs:extension>
4688+ </xs:simpleContent>
4689+ </xs:complexType>
4690+ <xs:simpleType name="ActiveOrHistoricCurrencyCode">
4691+ <xs:restriction base="xs:string">
4692+ <xs:pattern value="[A-Z]{3,3}"/>
4693+ </xs:restriction>
4694+ </xs:simpleType>
4695+ <xs:simpleType name="AddressType2Code">
4696+ <xs:restriction base="xs:string">
4697+ <xs:enumeration value="ADDR"/>
4698+ <xs:enumeration value="PBOX"/>
4699+ <xs:enumeration value="HOME"/>
4700+ <xs:enumeration value="BIZZ"/>
4701+ <xs:enumeration value="MLTO"/>
4702+ <xs:enumeration value="DLVY"/>
4703+ </xs:restriction>
4704+ </xs:simpleType>
4705+ <xs:complexType name="AmountType3Choice">
4706+ <xs:sequence>
4707+ <xs:choice>
4708+ <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
4709+ <xs:element name="EqvtAmt" type="EquivalentAmount2"/>
4710+ </xs:choice>
4711+ </xs:sequence>
4712+ </xs:complexType>
4713+ <xs:simpleType name="AnyBICIdentifier">
4714+ <xs:restriction base="xs:string">
4715+ <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
4716+ </xs:restriction>
4717+ </xs:simpleType>
4718+ <xs:complexType name="Authorisation1Choice">
4719+ <xs:sequence>
4720+ <xs:choice>
4721+ <xs:element name="Cd" type="Authorisation1Code"/>
4722+ <xs:element name="Prtry" type="Max128Text"/>
4723+ </xs:choice>
4724+ </xs:sequence>
4725+ </xs:complexType>
4726+ <xs:simpleType name="Authorisation1Code">
4727+ <xs:restriction base="xs:string">
4728+ <xs:enumeration value="AUTH"/>
4729+ <xs:enumeration value="FDET"/>
4730+ <xs:enumeration value="FSUM"/>
4731+ <xs:enumeration value="ILEV"/>
4732+ </xs:restriction>
4733+ </xs:simpleType>
4734+ <xs:simpleType name="BICIdentifier">
4735+ <xs:restriction base="xs:string">
4736+ <xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
4737+ </xs:restriction>
4738+ </xs:simpleType>
4739+ <xs:simpleType name="BaseOneRate">
4740+ <xs:restriction base="xs:decimal">
4741+ <xs:fractionDigits value="10"/>
4742+ <xs:totalDigits value="11"/>
4743+ </xs:restriction>
4744+ </xs:simpleType>
4745+ <xs:simpleType name="BatchBookingIndicator">
4746+ <xs:restriction base="xs:boolean"/>
4747+ </xs:simpleType>
4748+ <xs:complexType name="BranchAndFinancialInstitutionIdentification4">
4749+ <xs:sequence>
4750+ <xs:element name="FinInstnId" type="FinancialInstitutionIdentification7"/>
4751+ <xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
4752+ </xs:sequence>
4753+ </xs:complexType>
4754+ <xs:complexType name="BranchData2">
4755+ <xs:sequence>
4756+ <xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
4757+ <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
4758+ <xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
4759+ </xs:sequence>
4760+ </xs:complexType>
4761+ <xs:complexType name="CashAccount16">
4762+ <xs:sequence>
4763+ <xs:element name="Id" type="AccountIdentification4Choice"/>
4764+ <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2"/>
4765+ <xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
4766+ <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
4767+ </xs:sequence>
4768+ </xs:complexType>
4769+ <xs:complexType name="CashAccountType2">
4770+ <xs:sequence>
4771+ <xs:choice>
4772+ <xs:element name="Cd" type="CashAccountType4Code"/>
4773+ <xs:element name="Prtry" type="Max35Text"/>
4774+ </xs:choice>
4775+ </xs:sequence>
4776+ </xs:complexType>
4777+ <xs:simpleType name="CashAccountType4Code">
4778+ <xs:restriction base="xs:string">
4779+ <xs:enumeration value="CASH"/>
4780+ <xs:enumeration value="CHAR"/>
4781+ <xs:enumeration value="COMM"/>
4782+ <xs:enumeration value="TAXE"/>
4783+ <xs:enumeration value="CISH"/>
4784+ <xs:enumeration value="TRAS"/>
4785+ <xs:enumeration value="SACC"/>
4786+ <xs:enumeration value="CACC"/>
4787+ <xs:enumeration value="SVGS"/>
4788+ <xs:enumeration value="ONDP"/>
4789+ <xs:enumeration value="MGLD"/>
4790+ <xs:enumeration value="NREX"/>
4791+ <xs:enumeration value="MOMA"/>
4792+ <xs:enumeration value="LOAN"/>
4793+ <xs:enumeration value="SLRY"/>
4794+ <xs:enumeration value="ODFT"/>
4795+ </xs:restriction>
4796+ </xs:simpleType>
4797+ <xs:complexType name="CategoryPurpose1Choice">
4798+ <xs:sequence>
4799+ <xs:choice>
4800+ <xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
4801+ <xs:element name="Prtry" type="Max35Text"/>
4802+ </xs:choice>
4803+ </xs:sequence>
4804+ </xs:complexType>
4805+ <xs:simpleType name="ChargeBearerType1Code">
4806+ <xs:restriction base="xs:string">
4807+ <xs:enumeration value="DEBT"/>
4808+ <xs:enumeration value="CRED"/>
4809+ <xs:enumeration value="SHAR"/>
4810+ <xs:enumeration value="SLEV"/>
4811+ </xs:restriction>
4812+ </xs:simpleType>
4813+ <xs:complexType name="Cheque6">
4814+ <xs:sequence>
4815+ <xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
4816+ <xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
4817+ <xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
4818+ <xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
4819+ <xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
4820+ <xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
4821+ <xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
4822+ <xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
4823+ <xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
4824+ <xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
4825+ <xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
4826+ </xs:sequence>
4827+ </xs:complexType>
4828+ <xs:simpleType name="ChequeDelivery1Code">
4829+ <xs:restriction base="xs:string">
4830+ <xs:enumeration value="MLDB"/>
4831+ <xs:enumeration value="MLCD"/>
4832+ <xs:enumeration value="MLFA"/>
4833+ <xs:enumeration value="CRDB"/>
4834+ <xs:enumeration value="CRCD"/>
4835+ <xs:enumeration value="CRFA"/>
4836+ <xs:enumeration value="PUDB"/>
4837+ <xs:enumeration value="PUCD"/>
4838+ <xs:enumeration value="PUFA"/>
4839+ <xs:enumeration value="RGDB"/>
4840+ <xs:enumeration value="RGCD"/>
4841+ <xs:enumeration value="RGFA"/>
4842+ </xs:restriction>
4843+ </xs:simpleType>
4844+ <xs:complexType name="ChequeDeliveryMethod1Choice">
4845+ <xs:sequence>
4846+ <xs:choice>
4847+ <xs:element name="Cd" type="ChequeDelivery1Code"/>
4848+ <xs:element name="Prtry" type="Max35Text"/>
4849+ </xs:choice>
4850+ </xs:sequence>
4851+ </xs:complexType>
4852+ <xs:simpleType name="ChequeType2Code">
4853+ <xs:restriction base="xs:string">
4854+ <xs:enumeration value="CCHQ"/>
4855+ <xs:enumeration value="CCCH"/>
4856+ <xs:enumeration value="BCHQ"/>
4857+ <xs:enumeration value="DRFT"/>
4858+ <xs:enumeration value="ELDR"/>
4859+ </xs:restriction>
4860+ </xs:simpleType>
4861+ <xs:complexType name="ClearingSystemIdentification2Choice">
4862+ <xs:sequence>
4863+ <xs:choice>
4864+ <xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
4865+ <xs:element name="Prtry" type="Max35Text"/>
4866+ </xs:choice>
4867+ </xs:sequence>
4868+ </xs:complexType>
4869+ <xs:complexType name="ClearingSystemMemberIdentification2">
4870+ <xs:sequence>
4871+ <xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
4872+ <xs:element name="MmbId" type="Max35Text"/>
4873+ </xs:sequence>
4874+ </xs:complexType>
4875+ <xs:complexType name="ContactDetails2">
4876+ <xs:sequence>
4877+ <xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
4878+ <xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
4879+ <xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
4880+ <xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
4881+ <xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
4882+ <xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
4883+ <xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
4884+ </xs:sequence>
4885+ </xs:complexType>
4886+ <xs:simpleType name="CountryCode">
4887+ <xs:restriction base="xs:string">
4888+ <xs:pattern value="[A-Z]{2,2}"/>
4889+ </xs:restriction>
4890+ </xs:simpleType>
4891+ <xs:simpleType name="CreditDebitCode">
4892+ <xs:restriction base="xs:string">
4893+ <xs:enumeration value="CRDT"/>
4894+ <xs:enumeration value="DBIT"/>
4895+ </xs:restriction>
4896+ </xs:simpleType>
4897+ <xs:complexType name="CreditTransferTransactionInformation10">
4898+ <xs:sequence>
4899+ <xs:element name="PmtId" type="PaymentIdentification1"/>
4900+ <xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
4901+ <xs:element name="Amt" type="AmountType3Choice"/>
4902+ <xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRateInformation1"/>
4903+ <xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
4904+ <xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque6"/>
4905+ <xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/>
4906+ <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification4"/>
4907+ <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount16"/>
4908+ <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification4"/>
4909+ <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount16"/>
4910+ <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification4"/>
4911+ <xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount16"/>
4912+ <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
4913+ <xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount16"/>
4914+ <xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification32"/>
4915+ <xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount16"/>
4916+ <xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/>
4917+ <xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
4918+ <xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
4919+ <xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
4920+ <xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
4921+ <xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
4922+ <xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
4923+ <xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation5"/>
4924+ </xs:sequence>
4925+ </xs:complexType>
4926+ <xs:complexType name="CreditorReferenceInformation2">
4927+ <xs:sequence>
4928+ <xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
4929+ <xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
4930+ </xs:sequence>
4931+ </xs:complexType>
4932+ <xs:complexType name="CreditorReferenceType1Choice">
4933+ <xs:sequence>
4934+ <xs:choice>
4935+ <xs:element name="Cd" type="DocumentType3Code"/>
4936+ <xs:element name="Prtry" type="Max35Text"/>
4937+ </xs:choice>
4938+ </xs:sequence>
4939+ </xs:complexType>
4940+ <xs:complexType name="CreditorReferenceType2">
4941+ <xs:sequence>
4942+ <xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
4943+ <xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
4944+ </xs:sequence>
4945+ </xs:complexType>
4946+ <xs:complexType name="CustomerCreditTransferInitiationV03">
4947+ <xs:sequence>
4948+ <xs:element name="GrpHdr" type="GroupHeader32"/>
4949+ <xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstructionInformation3"/>
4950+ </xs:sequence>
4951+ </xs:complexType>
4952+ <xs:complexType name="DateAndPlaceOfBirth">
4953+ <xs:sequence>
4954+ <xs:element name="BirthDt" type="ISODate"/>
4955+ <xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
4956+ <xs:element name="CityOfBirth" type="Max35Text"/>
4957+ <xs:element name="CtryOfBirth" type="CountryCode"/>
4958+ </xs:sequence>
4959+ </xs:complexType>
4960+ <xs:complexType name="DatePeriodDetails">
4961+ <xs:sequence>
4962+ <xs:element name="FrDt" type="ISODate"/>
4963+ <xs:element name="ToDt" type="ISODate"/>
4964+ </xs:sequence>
4965+ </xs:complexType>
4966+ <xs:simpleType name="DecimalNumber">
4967+ <xs:restriction base="xs:decimal">
4968+ <xs:fractionDigits value="17"/>
4969+ <xs:totalDigits value="18"/>
4970+ </xs:restriction>
4971+ </xs:simpleType>
4972+ <xs:complexType name="Document">
4973+ <xs:sequence>
4974+ <xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV03"/>
4975+ </xs:sequence>
4976+ </xs:complexType>
4977+ <xs:complexType name="DocumentAdjustment1">
4978+ <xs:sequence>
4979+ <xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
4980+ <xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
4981+ <xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
4982+ <xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
4983+ </xs:sequence>
4984+ </xs:complexType>
4985+ <xs:simpleType name="DocumentType3Code">
4986+ <xs:restriction base="xs:string">
4987+ <xs:enumeration value="RADM"/>
4988+ <xs:enumeration value="RPIN"/>
4989+ <xs:enumeration value="FXDR"/>
4990+ <xs:enumeration value="DISP"/>
4991+ <xs:enumeration value="PUOR"/>
4992+ <xs:enumeration value="SCOR"/>
4993+ </xs:restriction>
4994+ </xs:simpleType>
4995+ <xs:simpleType name="DocumentType5Code">
4996+ <xs:restriction base="xs:string">
4997+ <xs:enumeration value="MSIN"/>
4998+ <xs:enumeration value="CNFA"/>
4999+ <xs:enumeration value="DNFA"/>
5000+ <xs:enumeration value="CINV"/>
The diff has been truncated for viewing.