← Back to team overview

account-payment-team team mailing list archive

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

 

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

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

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

Hello,

This new module provides export to SEPA XML Files to account_payment_extension.

It depends of sepa_pain, a module with generic function to export the account payments order.
For this module has been created a project because is a generic module that can be used for any payment management system.

https://launchpad.net/sepa-tools

Greetings,
Ignacio Ibeas
-- 
https://code.launchpad.net/~openerp-sepa-team/account-payment/account-payment-sepa-6.1/+merge/200480
Your team Account Payment is requested to review the proposed merge of lp:~openerp-sepa-team/account-payment/account-payment-sepa-6.1 into lp:account-payment.
=== added directory 'account_payment_sepa'
=== added file 'account_payment_sepa/__init__.py'
--- account_payment_sepa/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/__init__.py	2014-01-05 18:17:44 +0000
@@ -0,0 +1,26 @@
+# -*- encoding: utf-8 -*-
+########################################################################
+#
+# @authors: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+# Copyright (C) 2013  Acysos S.L.
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, either version 3 of the License, or
+#(at your option) any later version.
+#
+# This module is GPLv3 or newer and incompatible
+# with OpenERP SA "AGPL + Private Use License"!
+#
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License
+#along with this program.  If not, see http://www.gnu.org/licenses.
+########################################################################
+
+import payment_type_file
+import payment_mode
+import wizard

=== added file 'account_payment_sepa/__openerp__.py'
--- account_payment_sepa/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/__openerp__.py	2014-01-05 18:17:44 +0000
@@ -0,0 +1,55 @@
+# -*- encoding: utf-8 -*-
+########################################################################
+#
+# @authors: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+# Copyright (C) 2013  Acysos S.L.
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, either version 3 of the License, or
+#(at your option) any later version.
+#
+# This module is GPLv3 or newer and incompatible
+# with OpenERP SA 'AGPL + Private Use License'!
+#
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License
+#along with this program.  If not, see http://www.gnu.org/licenses.
+########################################################################
+
+{
+    'name': 'Account Payment SEPA',
+    'version': '1.0',
+    'depends': ['base'],
+    'author': 'Acysos S.L.',
+    'website': 'http://www.acysos.com',
+    'category': 'Generic Modules/Accounting',
+    'complexity': 'normal',
+    'description': '''
+    This module provide export Account Payment Order to Core, B2B and transfer
+    SEPA XML format.
+    This module is based in banking-addons (https://launchpad.net/banking-addons)
+    ''',
+    'depends' : [
+        'account',
+        'account_payment',
+        'account_payment_extension',
+        'sepa_pain'
+        ],
+    'init_xml': [],
+    'update_xml': ['account_payment_view.xml',
+                   'wizard/export_sepa_view.xml',
+                   'data/payment_type_file_sepa.xml',
+                   'security/ir.model.access.csv',
+                   ],
+    'demo_xml': [],
+    'test': [],
+    'installable': True,
+    'auto_install': False,
+#    'images' : [],
+#    'certificate': 'certificate',
+}
\ No newline at end of file

=== added file 'account_payment_sepa/account_payment_view.xml'
--- account_payment_sepa/account_payment_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/account_payment_view.xml	2014-01-05 18:17:44 +0000
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <record id="view_payment_mode_tree_remesas" model="ir.ui.view">
+            <field name="name">payment.mode.tree</field>
+            <field name="model">payment.mode</field>
+            <field name="type">tree</field>
+            <field name="inherit_id" ref="account_payment.view_payment_mode_tree"/>
+            <field name="arch" type="xml">
+                <field name="journal" position="after">
+                    <field name="file_type"/>
+                </field>
+            </field>
+        </record>
+        <record id="view_payment_mode_form_remesas" model="ir.ui.view">
+            <field name="name">payment.mode.form</field>
+            <field name="model">payment.mode</field>
+            <field name="type">form</field>
+            <field name="inherit_id" ref="account_payment.view_payment_mode_form"/>
+            <field name="arch" type="xml">
+                <field name="bank_id" position="after">
+                    <field name="file_type" widget="selection"/>
+                </field>
+            </field>
+        </record>
+
+    </data>
+</openerp>

=== added directory 'account_payment_sepa/data'
=== added file 'account_payment_sepa/data/payment_type_file_sepa.xml'
--- account_payment_sepa/data/payment_type_file_sepa.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/data/payment_type_file_sepa.xml	2014-01-05 18:17:44 +0000
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data noupdate="0">
+
+<record id="none" model="payment.type.file">
+    <field name="name">None</field>
+    <field name="code">none</field>
+</record>
+
+<record id="export_sepa_sct_008_001_02" model="payment.type.file">
+    <field name="name">SEPA Direct Debit</field>
+    <field name="code">pain.008.001.02</field>
+</record>
+
+<record id="export_sepa_sct_001_001_05" model="payment.type.file">
+    <field name="name">SEPA Credit Transfer v05</field>
+    <field name="code">pain.001.001.05</field>
+</record>
+
+<record id="export_sepa_sct_001_001_04" model="payment.type.file">
+    <field name="name">SEPA Credit Transfer v04</field>
+    <field name="code">pain.001.001.04</field>
+</record>
+
+<record id="export_sepa_sct_001_001_03" model="payment.type.file">
+    <field name="name">SEPA Credit Transfer v03 (recommended)</field>
+    <field name="code">pain.001.001.03</field>
+</record>
+
+<record id="export_sepa_sct_001_001_02" model="payment.type.file">
+    <field name="name">SEPA Credit Transfer v02</field>
+    <field name="code">pain.001.001.02</field>
+</record>
+
+
+</data>
+</openerp>
\ No newline at end of file

=== added directory 'account_payment_sepa/i18n'
=== added file 'account_payment_sepa/i18n/account_payment_sepa.pot'
--- account_payment_sepa/i18n/account_payment_sepa.pot	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/i18n/account_payment_sepa.pot	2014-01-05 18:17:44 +0000
@@ -0,0 +1,176 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment_sepa
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.3\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2014-01-02 14:51+0000\n"
+"PO-Revision-Date: 2014-01-02 14:51+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_payment_sepa
+#: help:payment.type.file,name:0
+msgid "Payment Type"
+msgstr ""
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,note:0
+msgid "Log"
+msgstr ""
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,attach_id:0
+msgid "Payment order file"
+msgstr ""
+
+#. module: account_payment_sepa
+#: view:export.sepa.wizard:0
+msgid "_Export"
+msgstr ""
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,prefered_exec_date:0
+msgid "Prefered Execution Date"
+msgstr ""
+
+#. module: account_payment_sepa
+#: model:ir.model,name:account_payment_sepa.model_payment_mode
+msgid "Payment Mode"
+msgstr ""
+
+#. module: account_payment_sepa
+#: selection:export.sepa.wizard,charge_bearer:0
+msgid "Shared"
+msgstr ""
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,batch_booking:0
+msgid "Batch Booking"
+msgstr ""
+
+#. module: account_payment_sepa
+#: field:payment.type.file,name:0
+msgid "Name"
+msgstr ""
+
+#. module: account_payment_sepa
+#: selection:export.sepa.wizard,charge_bearer:0
+msgid "Following Service Level"
+msgstr ""
+
+#. module: account_payment_sepa
+#: selection:export.sepa.wizard,charge_bearer:0
+msgid "Borne by Creditor"
+msgstr ""
+
+#. module: account_payment_sepa
+#: model:ir.actions.act_window,name:account_payment_sepa.action_export_sepa_wizard
+msgid "Export SEPA file"
+msgstr ""
+
+#. module: account_payment_sepa
+#: field:payment.mode,file_type:0
+msgid "Payment type file"
+msgstr ""
+
+#. module: account_payment_sepa
+#: code:addons/account_payment_sepa/wizard/export_sepa.py:78
+#, python-format
+msgid "Total amount : %.2f\n"
+""
+msgstr ""
+
+#. module: account_payment_sepa
+#: help:payment.mode,file_type:0
+msgid "Select the Payment Type File to export."
+msgstr ""
+
+#. module: account_payment_sepa
+#: help:export.sepa.wizard,charge_bearer:0
+msgid "Following service level : transaction charges are to be \n"
+"            applied following the rules agreed in the service level and/or \n"
+"            scheme (SEPA Core messages must use this). Shared : transaction \n"
+"            charges on the debtor side are to be borne by the debtor, \n"
+"            transaction charges on the creditor side are to be borne by the \n"
+"            creditor. Borne by creditor : all transaction charges are to be \n"
+"            borne by the creditor. Borne by debtor : all transaction charges\n"
+"             are to be borne by the debtor."
+msgstr ""
+
+#. module: account_payment_sepa
+#: selection:export.sepa.wizard,charge_bearer:0
+msgid "Borne by Debtor"
+msgstr ""
+
+#. module: account_payment_sepa
+#: model:ir.model,name:account_payment_sepa.model_payment_type_file
+msgid "Payment export type file"
+msgstr ""
+
+#. module: account_payment_sepa
+#: code:addons/account_payment_sepa/wizard/export_sepa.py:79
+#, python-format
+msgid "Total Number of Payments: %d\n"
+""
+msgstr ""
+
+#. module: account_payment_sepa
+#: view:export.sepa.wizard:0
+msgid "Payment order export"
+msgstr ""
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,charge_bearer:0
+msgid "Charge Bearer"
+msgstr ""
+
+#. module: account_payment_sepa
+#: help:export.sepa.wizard,batch_booking:0
+msgid "Join payment \n"
+"            lines of the same partner and bank account"
+msgstr ""
+
+#. module: account_payment_sepa
+#: help:payment.type.file,code:0
+msgid "Specify the Code for Payment Type"
+msgstr ""
+
+#. module: account_payment_sepa
+#: model:ir.model,name:account_payment_sepa.model_export_sepa_wizard
+msgid "export.sepa.wizard"
+msgstr ""
+
+#. module: account_payment_sepa
+#: field:payment.type.file,code:0
+msgid "Code"
+msgstr ""
+
+#. module: account_payment_sepa
+#: help:export.sepa.wizard,prefered_exec_date:0
+msgid "This is the date on which the file should be processed by \n"
+"            the bank. Please keep in mind that banks only execute on working\n"
+"             days and typically use a delay of two days between execution \n"
+"            date and effective transfer date."
+msgstr ""
+
+#. module: account_payment_sepa
+#: code:addons/account_payment_sepa/wizard/export_sepa.py:77
+#, python-format
+msgid "Successfully Exported\n"
+"\n"
+"Summary:\n"
+""
+msgstr ""
+
+#. module: account_payment_sepa
+#: view:export.sepa.wizard:0
+msgid "Cancel"
+msgstr ""
+

=== added file 'account_payment_sepa/i18n/es.po'
--- account_payment_sepa/i18n/es.po	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/i18n/es.po	2014-01-05 18:17:44 +0000
@@ -0,0 +1,189 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment_sepa
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.3\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2014-01-02 14:52+0000\n"
+"PO-Revision-Date: 2014-01-02 14:52+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_payment_sepa
+#: help:payment.type.file,name:0
+msgid "Payment Type"
+msgstr "Tipo de pago"
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,note:0
+msgid "Log"
+msgstr "Log"
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,attach_id:0
+msgid "Payment order file"
+msgstr "Archivo de la orden de pago"
+
+#. module: account_payment_sepa
+#: view:export.sepa.wizard:0
+msgid "_Export"
+msgstr "_Exportar"
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,prefered_exec_date:0
+msgid "Prefered Execution Date"
+msgstr "Fecha preferida de ejecución"
+
+#. module: account_payment_sepa
+#: model:ir.model,name:account_payment_sepa.model_payment_mode
+msgid "Payment Mode"
+msgstr "Modo de pago"
+
+#. module: account_payment_sepa
+#: selection:export.sepa.wizard,charge_bearer:0
+msgid "Shared"
+msgstr "Compartido"
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,batch_booking:0
+msgid "Batch Booking"
+msgstr "Agrupar pagos"
+
+#. module: account_payment_sepa
+#: field:payment.type.file,name:0
+msgid "Name"
+msgstr "Nombre"
+
+#. module: account_payment_sepa
+#: selection:export.sepa.wizard,charge_bearer:0
+msgid "Following Service Level"
+msgstr "Según nivel del servicio"
+
+#. module: account_payment_sepa
+#: selection:export.sepa.wizard,charge_bearer:0
+msgid "Borne by Creditor"
+msgstr "A cargo del acreedor"
+
+#. module: account_payment_sepa
+#: model:ir.actions.act_window,name:account_payment_sepa.action_export_sepa_wizard
+msgid "Export SEPA file"
+msgstr "Exportar archivo SEPA"
+
+#. module: account_payment_sepa
+#: field:payment.mode,file_type:0
+msgid "Payment type file"
+msgstr "Tipo de archivo de pago"
+
+#. module: account_payment_sepa
+#: code:addons/account_payment_sepa/wizard/export_sepa.py:78
+#, python-format
+msgid "Total amount : %.2f\n"
+""
+msgstr "Total : %.2f\n"
+""
+
+#. module: account_payment_sepa
+#: help:payment.mode,file_type:0
+msgid "Select the Payment Type File to export."
+msgstr "Seleccione el tipo de archivo de pago en el que va exportar."
+
+#. module: account_payment_sepa
+#: help:export.sepa.wizard,charge_bearer:0
+msgid "Following service level : transaction charges are to be \n"
+"            applied following the rules agreed in the service level and/or \n"
+"            scheme (SEPA Core messages must use this). Shared : transaction \n"
+"            charges on the debtor side are to be borne by the debtor, \n"
+"            transaction charges on the creditor side are to be borne by the \n"
+"            creditor. Borne by creditor : all transaction charges are to be \n"
+"            borne by the creditor. Borne by debtor : all transaction charges\n"
+"             are to be borne by the debtor."
+msgstr "Según el nivel del servicio : los gastos de la transacción serán \n"
+"            aplicados según las reglas acordadas a nivel de servicio y/o \n"
+"            esquepa (los transacciones de SEPA Core usan este). Compartidos :\n"
+"            los gastos son compartidos entre el deudor y acreedor. \n"
+"            A cargo del acreedor : todos los gastos son a cargo del acreedor.\n"
+"            Acargo del deudor : todos los gastos son a cargo del deudor."
+
+#. module: account_payment_sepa
+#: selection:export.sepa.wizard,charge_bearer:0
+msgid "Borne by Debtor"
+msgstr "A cargo del deudor"
+
+#. module: account_payment_sepa
+#: model:ir.model,name:account_payment_sepa.model_payment_type_file
+msgid "Payment export type file"
+msgstr "Tipos de archivos de pago exportables"
+
+#. module: account_payment_sepa
+#: code:addons/account_payment_sepa/wizard/export_sepa.py:79
+#, python-format
+msgid "Total Number of Payments: %d\n"
+""
+msgstr "Número total de pagos: %d\n"
+""
+
+#. module: account_payment_sepa
+#: view:export.sepa.wizard:0
+msgid "Payment order export"
+msgstr "Exportar orden de pago"
+
+#. module: account_payment_sepa
+#: field:export.sepa.wizard,charge_bearer:0
+msgid "Charge Bearer"
+msgstr "Gastos a cargo de"
+
+#. module: account_payment_sepa
+#: help:export.sepa.wizard,batch_booking:0
+msgid "Join payment \n"
+"            lines of the same partner and bank account"
+msgstr "Agrupar las lineas de pago de una misma empresa"
+
+#. module: account_payment_sepa
+#: help:payment.type.file,code:0
+msgid "Specify the Code for Payment Type"
+msgstr "Especifica el código del tipo de pago"
+
+#. module: account_payment_sepa
+#: model:ir.model,name:account_payment_sepa.model_export_sepa_wizard
+msgid "export.sepa.wizard"
+msgstr "export.sepa.wizard"
+
+#. module: account_payment_sepa
+#: field:payment.type.file,code:0
+msgid "Code"
+msgstr "Código"
+
+#. module: account_payment_sepa
+#: help:export.sepa.wizard,prefered_exec_date:0
+msgid "This is the date on which the file should be processed by \n"
+"            the bank. Please keep in mind that banks only execute on working\n"
+"             days and typically use a delay of two days between execution \n"
+"            date and effective transfer date."
+msgstr "Esta es la fecha en la que se procesará el archivo en el banco. \n"
+"            Por favor, tenga en cuenta que hay banco que solo ejecutan \n"
+"            las ordenes en los días laborables, por lo tanto puede existir\n"
+"            de dos días entre esta fecha y la efectiva"
+
+#. module: account_payment_sepa
+#: code:addons/account_payment_sepa/wizard/export_sepa.py:77
+#, python-format
+msgid "Successfully Exported\n"
+"\n"
+"Summary:\n"
+""
+msgstr "Archivo exportado\n"
+"\n"
+"Resumen:\n"
+""
+
+#. module: account_payment_sepa
+#: view:export.sepa.wizard:0
+msgid "Cancel"
+msgstr "Cancelar"
+

=== added file 'account_payment_sepa/payment_mode.py'
--- account_payment_sepa/payment_mode.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/payment_mode.py	2014-01-05 18:17:44 +0000
@@ -0,0 +1,41 @@
+# -*- encoding: utf-8 -*-
+########################################################################
+#
+# @authors: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+# Copyright (C) 2013  Acysos S.L.
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, either version 3 of the License, or
+#(at your option) any later version.
+#
+# This module is GPLv3 or newer and incompatible
+# with OpenERP SA "AGPL + Private Use License"!
+#
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License
+#along with this program.  If not, see http://www.gnu.org/licenses.
+########################################################################
+
+from osv import osv
+from osv import fields
+import decimal_precision as dp
+from tools.translate import _
+import time
+
+class payment_mode(osv.osv):
+    _inherit = 'payment.mode'
+
+    _columns = {
+        'file_type': fields.many2one(
+            'payment.type.file', 'Payment type file',
+            required=True,
+            help='Select the Payment Type File to export.'
+            ),
+        }
+
+payment_mode()
\ No newline at end of file

=== added file 'account_payment_sepa/payment_type_file.py'
--- account_payment_sepa/payment_type_file.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/payment_type_file.py	2014-01-05 18:17:44 +0000
@@ -0,0 +1,44 @@
+# -*- encoding: utf-8 -*-
+########################################################################
+#
+# @authors: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+# Copyright (C) 2013  Acysos S.L.
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, either version 3 of the License, or
+#(at your option) any later version.
+#
+# This module is GPLv3 or newer and incompatible
+# with OpenERP SA "AGPL + Private Use License"!
+#
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License
+#along with this program.  If not, see http://www.gnu.org/licenses.
+########################################################################
+
+from osv import osv
+from osv import fields
+import decimal_precision as dp
+from tools.translate import _
+import time
+
+class payment_type_file(osv.osv):
+    _name = 'payment.type.file'
+    _description = 'Payment export type file'
+
+    _columns = {
+        'name': fields.char(
+            'Name', size=64, required=True,
+            help='Payment Type'
+            ),
+        'code': fields.char(
+            'Code', size=64, required=True,
+            help='Specify the Code for Payment Type'
+            ),
+        }
+payment_type_file()
\ No newline at end of file

=== added directory 'account_payment_sepa/security'
=== added file 'account_payment_sepa/security/ir.model.access.csv'
--- account_payment_sepa/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/security/ir.model.access.csv	2014-01-05 18:17:44 +0000
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_payment_type_file,payment.type.file,model_payment_type_file,account_payment.group_account_payment,1,1,1,1
+access_payment_type_file_user,payment.type.file.user,model_payment_type_file,base.group_user,1,0,0,0

=== added directory 'account_payment_sepa/wizard'
=== added file 'account_payment_sepa/wizard/__init__.py'
--- account_payment_sepa/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/wizard/__init__.py	2014-01-05 18:17:44 +0000
@@ -0,0 +1,24 @@
+# -*- encoding: utf-8 -*-
+########################################################################
+#
+# @authors: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+# Copyright (C) 2013  Acysos S.L.
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, either version 3 of the License, or
+#(at your option) any later version.
+#
+# This module is GPLv3 or newer and incompatible
+# with OpenERP SA "AGPL + Private Use License"!
+#
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License
+#along with this program.  If not, see http://www.gnu.org/licenses.
+########################################################################
+
+import export_sepa
\ No newline at end of file

=== added file 'account_payment_sepa/wizard/export_sepa.py'
--- account_payment_sepa/wizard/export_sepa.py	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/wizard/export_sepa.py	2014-01-05 18:17:44 +0000
@@ -0,0 +1,94 @@
+# -*- encoding: utf-8 -*-
+########################################################################
+#
+# @authors: Ignacio Ibeas <ignacio@xxxxxxxxxx>
+# Copyright (C) 2013  Acysos S.L.
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, either version 3 of the License, or
+#(at your option) any later version.
+#
+# This module is GPLv3 or newer and incompatible
+# with OpenERP SA "AGPL + Private Use License"!
+#
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License
+#along with this program.  If not, see http://www.gnu.org/licenses.
+########################################################################
+
+from osv import osv, fields
+import base64
+from tools.translate import _
+
+class export_sepa_wizard(osv.osv_memory):
+    _name='export.sepa.wizard'
+    
+    _columns = {
+        'batch_booking': fields.boolean('Batch Booking',help="""Join payment 
+            lines of the same partner and bank account"""),
+        'prefered_exec_date': fields.date(
+            'Prefered Execution Date',
+            help="""This is the date on which the file should be processed by 
+            the bank. Please keep in mind that banks only execute on working
+             days and typically use a delay of two days between execution 
+            date and effective transfer date."""),
+        'charge_bearer': fields.selection([
+            ('SLEV', 'Following Service Level'),
+            ('SHAR', 'Shared'),
+            ('CRED', 'Borne by Creditor'),
+            ('DEBT', 'Borne by Debtor'),
+            ], 'Charge Bearer', required=True,
+            help="""Following service level : transaction charges are to be 
+            applied following the rules agreed in the service level and/or 
+            scheme (SEPA Core messages must use this). Shared : transaction 
+            charges on the debtor side are to be borne by the debtor, 
+            transaction charges on the creditor side are to be borne by the 
+            creditor. Borne by creditor : all transaction charges are to be 
+            borne by the creditor. Borne by debtor : all transaction charges
+             are to be borne by the debtor."""),
+        'note': fields.text('Log'),
+        'attach_id':fields.many2one('ir.attachment', 'Payment order file', 
+                                    readonly=True), 
+    }
+    
+    _defaults = {
+        'charge_bearer': 'SLEV',
+        }
+    
+    def create_payment_file(self, cr, uid, ids, context):
+        sepa_pain_obj = self.pool.get('sepa.pain.export')
+        payment_order_obj = self.pool.get('payment.order')
+        form_obj = self.browse(cr, uid, ids)[0]
+        payment_order = payment_order_obj.browse(cr, uid, 
+                                                 context['active_id'], context)
+        pain_flavor = payment_order.mode.file_type.code
+        
+        sepa_config = sepa_pain_obj.prepare_config(cr, uid, payment_order, 
+                                                   pain_flavor,
+                                                   form_obj.batch_booking,
+                                                   form_obj.prefered_exec_date,
+                                                   form_obj.charge_bearer,
+                                                   context)
+        
+        sepa_root, transactions_count, total_amount = \
+            sepa_pain_obj.create_sepa(cr,uid,payment_order, 
+                                      sepa_config, context)
+        
+        attach_id = sepa_pain_obj.create_file(cr,uid,sepa_root,
+                                              sepa_config,payment_order,
+                                              context)
+        
+        note = _('Successfully Exported\n\nSummary:\n')
+        note += _('Total amount : %.2f\n') % (total_amount)
+        note += _('Total Number of Payments: %d\n') % (transactions_count)
+        
+        form_obj.write({'attach_id':attach_id,'note':note})
+        
+        return True
+    
+export_sepa_wizard()
\ No newline at end of file

=== added file 'account_payment_sepa/wizard/export_sepa_view.xml'
--- account_payment_sepa/wizard/export_sepa_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_sepa/wizard/export_sepa_view.xml	2014-01-05 18:17:44 +0000
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+       <record id="view_export_sepa_wizard_form" model="ir.ui.view">
+            <field name="name">export.sepa.wizard.form</field>
+            <field name="model">export.sepa.wizard</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Payment order export">
+                    <field name="batch_booking"/>
+                    <field name="prefered_exec_date"/>
+                    <field name="charge_bearer"/>
+                    <newline />
+                    <field name="attach_id" colspan="4" />
+                    <field name="note" colspan="4" nolabel="1"/>
+                    <separator string="" colspan="4" />
+                    <group colspan="4" col="6">
+                        <button icon="gtk-cancel" special="cancel" string="Cancel"/>
+                        <button  icon="gtk-execute" string="_Export" name="create_payment_file" type="object"/>
+                   </group>
+                </form>
+            </field>
+        </record>
+
+        <record id="action_export_sepa_wizard" model="ir.actions.act_window">
+            <field name="name">Export SEPA file</field>
+            <field name="res_model">export.sepa.wizard</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="view_export_sepa_wizard_form"/>
+            <field name="target">new</field>
+        </record>
+        <record id="action_export_sepa_wizard2" model="ir.values">
+            <field name="object" eval="1" />
+            <field name="name">Export SEPA file</field>
+            <field name="key2">client_action_multi</field>
+            <field name="value" eval="'ir.actions.act_window,' + str(ref('action_export_sepa_wizard'))"/>
+            <field name="key">action</field>
+            <field name="model">payment.order</field>
+        </record>
+    </data>
+</openerp>
\ No newline at end of file


Follow ups