From ddbae3e8c15fb9f6ff28d57023c2db890480fe8f Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 8 Apr 2015 16:00:32 +0200 Subject: [PATCH 1/2] Add support for scheme (CORE or B2B), backported from 8.0 --- .../account_banking_sdd.py | 5 +++++ .../sdd_mandate_view.xml | 12 ++++++++++++ .../wizard/export_sdd.py | 7 ++++--- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/account_banking_sepa_direct_debit/account_banking_sdd.py b/account_banking_sepa_direct_debit/account_banking_sdd.py index 998201b6a..dd2a9dd5d 100644 --- a/account_banking_sepa_direct_debit/account_banking_sdd.py +++ b/account_banking_sepa_direct_debit/account_banking_sdd.py @@ -166,10 +166,15 @@ class sdd_mandate(orm.Model): help="When the field 'Migrated to SEPA' is not active, this " "field will be used as the Original Mandate Identification in " "the Direct Debit file."), + 'scheme': fields.selection([ + ('CORE', 'Basic (CORE)'), + ('B2B', 'Enterprise (B2B)') + ], 'Scheme', required=True) } _defaults = { 'sepa_migrated': True, + 'scheme': 'CORE', } def _check_sdd_mandate(self, cr, uid, ids): diff --git a/account_banking_sepa_direct_debit/sdd_mandate_view.xml b/account_banking_sepa_direct_debit/sdd_mandate_view.xml index b5c475a3d..e842d870e 100644 --- a/account_banking_sepa_direct_debit/sdd_mandate_view.xml +++ b/account_banking_sepa_direct_debit/sdd_mandate_view.xml @@ -18,6 +18,7 @@ + mandate_partner_bank_change(partner_bank_id, type, recurrent_sequence_type, last_debit_date, state) @@ -37,6 +38,7 @@ + @@ -44,10 +46,20 @@ sdd.mandate.search account.banking.mandate + + + + + + diff --git a/account_banking_sepa_direct_debit/wizard/export_sdd.py b/account_banking_sepa_direct_debit/wizard/export_sdd.py index 02973b0f8..0b96ea5d0 100644 --- a/account_banking_sepa_direct_debit/wizard/export_sdd.py +++ b/account_banking_sepa_direct_debit/wizard/export_sdd.py @@ -195,6 +195,7 @@ class banking_export_sdd_wizard(orm.TransientModel): "line with partner '%s' and Invoice ref '%s'.") % (line.partner_id.name, line.ml_inv_ref.number)) + scheme = line.mandate_id.scheme if line.mandate_id.state != 'valid': raise orm.except_orm( _('Error:'), @@ -226,7 +227,7 @@ class banking_export_sdd_wizard(orm.TransientModel): assert seq_type_label is not False seq_type = seq_type_map[seq_type_label] - key = (requested_date, priority, seq_type) + key = (requested_date, priority, seq_type, scheme) if key in lines_per_group: lines_per_group[key].append(line) else: @@ -237,7 +238,7 @@ class banking_export_sdd_wizard(orm.TransientModel): cr, uid, line.id, {'date': requested_date}, context=context) - for (requested_date, priority, sequence_type), lines in \ + for (requested_date, priority, sequence_type, scheme), lines in \ lines_per_group.items(): # B. Payment info payment_info_2_0, nb_of_transactions_2_4, control_sum_2_5 = \ @@ -246,7 +247,7 @@ class banking_export_sdd_wizard(orm.TransientModel): "sepa_export.payment_order_ids[0].reference + '-' + " "sequence_type + '-' + requested_date.replace('-', '') " "+ '-' + priority", - priority, 'CORE', sequence_type, requested_date, { + priority, scheme, sequence_type, requested_date, { 'sepa_export': sepa_export, 'sequence_type': sequence_type, 'priority': priority, From e5d5dc4d5994ecc26fb4c1e4f12f3cf51847f81a Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 8 Apr 2015 16:10:04 +0200 Subject: [PATCH 2/2] =?UTF-8?q?FIX=20french=20translation:=20direct=20debi?= =?UTF-8?q?t=20->=20pr=C3=A9l=C3=A8vement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- account_banking_mandate/i18n/fr.po | 10 +++++----- account_direct_debit/i18n/fr.po | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/account_banking_mandate/i18n/fr.po b/account_banking_mandate/i18n/fr.po index f3c69126b..e61b427be 100644 --- a/account_banking_mandate/i18n/fr.po +++ b/account_banking_mandate/i18n/fr.po @@ -19,7 +19,7 @@ msgstr "" #. module: account_banking_mandate #: view:res.partner.bank:0 msgid "Direct Debit Mandates" -msgstr "Mandats de débit direct" +msgstr "Mandats de prélèvement" #. module: account_banking_mandate #: model:mail.message.subtype,description:account_banking_mandate.mandate_cancel @@ -93,7 +93,7 @@ msgstr "Mandat bancaire a expiré" #. module: account_banking_mandate #: field:account.invoice,mandate_id:0 field:payment.line,mandate_id:0 msgid "Direct Debit Mandate" -msgstr "Mandat de débit direct" +msgstr "Mandat de prélèvement" #. module: account_banking_mandate #: code:addons/account_banking_mandate/model/account_banking_mandate.py:121 @@ -102,7 +102,7 @@ msgid "" "The mandate '%s' can't have a date of last debit before the date of " "signature." msgstr "" -"Le mandat '% s' ne peut pas avoir une date de la dernière débit avant la " +"Le mandat '% s' ne peut pas avoir une date de dernier prélèvement avant la " "date de la signature." #. module: account_banking_mandate @@ -119,7 +119,7 @@ msgstr "Mandat annulé" #: code:addons/account_banking_mandate/model/account_banking_mandate.py:189 #, python-format msgid "Mandate should be in cancel state" -msgstr "Mandat doit être au statut ​​annuler" +msgstr "Le mandat devrait être à l'état annulé" #. module: account_banking_mandate #: constraint:account.banking.mandate:0 constraint:payment.line:0 @@ -263,7 +263,7 @@ msgstr "Date de signature du mandat" #. module: account_banking_mandate #: field:account.banking.mandate,last_debit_date:0 msgid "Date of the Last Debit" -msgstr "Date du dernier débit" +msgstr "Date du dernier prélèvement" #. module: account_banking_mandate #: view:account.banking.mandate:0 diff --git a/account_direct_debit/i18n/fr.po b/account_direct_debit/i18n/fr.po index f4d026df0..22c1f6699 100644 --- a/account_direct_debit/i18n/fr.po +++ b/account_direct_debit/i18n/fr.po @@ -19,7 +19,7 @@ msgstr "" #. module: account_direct_debit #: model:account.payment.term,note:account_direct_debit.payment_term_direct_debit msgid "Direct debit in 14 days" -msgstr "Débit direct en 14 jours" +msgstr "Prélèvement dans 14 jours" #. module: account_direct_debit #: model:ir.model,name:account_direct_debit.model_payment_order @@ -86,12 +86,12 @@ msgstr "Débit refusé" #: model:ir.actions.act_window,name:account_direct_debit.action_debit_order_tree #: model:ir.ui.menu,name:account_direct_debit.menu_action_debit_order_form msgid "Direct Debit Orders" -msgstr "Ordre de débit direct" +msgstr "Ordres de prélèvement" #. module: account_direct_debit #: model:account.payment.term,name:account_direct_debit.payment_term_direct_debit msgid "Direct debit" -msgstr "Débit direct" +msgstr "Prélèvement" #. module: account_direct_debit #: code:addons/account_direct_debit/model/account_invoice.py:150 @@ -107,7 +107,7 @@ msgstr "" #: code:addons/account_direct_debit/model/account_invoice.py:154 #, python-format msgid "Invoice '%s': direct debit is denied." -msgstr "Facture '% s': débit diretc est refusé." +msgstr "Facture '% s': prélèvement refusé." #. module: account_direct_debit #: code:addons/account_direct_debit/model/payment_line.py:141