diff --git a/addons/payment/data/payment_acquirer_data.xml b/addons/payment/data/payment_acquirer_data.xml index 233baf64501..f956de72633 100644 --- a/addons/payment/data/payment_acquirer_data.xml +++ b/addons/payment/data/payment_acquirer_data.xml @@ -279,4 +279,17 @@ + + + SEPA Direct Debit + + + + +

+ SEPA Direct Debit is a Europe-wide Direct Debit system that allows merchants to collect Euro-denominated payments from accounts in the 34 SEPA countries and associated territories. +

+
+
+ diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py index 31df0df1cd8..f9d703972d8 100644 --- a/addons/payment/models/payment_acquirer.py +++ b/addons/payment/models/payment_acquirer.py @@ -154,6 +154,7 @@ class PaymentAcquirer(models.Model): # TDE FIXME: remove that brol module_id = fields.Many2one('ir.module.module', string='Corresponding Module') module_state = fields.Selection(selection=ir_module.STATES, string='Installation State', related='module_id.state', store=True) + module_to_buy = fields.Boolean(string='Odoo Enterprise Module', related='module_id.to_buy', readonly=True, store=False) image_128 = fields.Image("Image", max_width=128, max_height=128) @@ -271,7 +272,7 @@ class PaymentAcquirer(models.Model): # If the trigger comes from the chart template wizard, the modules are already installed. acquirer_modules = self.env['ir.module.module'].search( [('name', 'like', 'payment_%'), ('state', 'in', ('to install', 'installed'))]) - acquirer_names = [a.name.split('_')[1] for a in acquirer_modules] + acquirer_names = [a.name.split('_', 1)[1] for a in acquirer_modules] # Search for acquirers having no journal company = company or self.env.company diff --git a/addons/payment/static/src/js/payment_processing.js b/addons/payment/static/src/js/payment_processing.js index 361cc3dbf4c..53b688be06a 100644 --- a/addons/payment/static/src/js/payment_processing.js +++ b/addons/payment/static/src/js/payment_processing.js @@ -71,7 +71,7 @@ odoo.define('payment.processing', function (require) { 'tx_error': [], }; - if (transactions.length > 0 && transactions[0].acquirer_provider == 'transfer') { + if (transactions.length > 0 && ['transfer', 'sepa_direct_debit'].indexOf(transactions[0].acquirer_provider) >= 0) { window.location = transactions[0].return_url; return; } diff --git a/addons/payment/views/payment_views.xml b/addons/payment/views/payment_views.xml index f4c4cfc7c05..54264fd2d43 100644 --- a/addons/payment/views/payment_views.xml +++ b/addons/payment/views/payment_views.xml @@ -20,12 +20,14 @@ +

-
@@ -104,10 +106,12 @@ + +
Acquirer @@ -120,7 +124,11 @@ - + + + + Enterprise +
diff --git a/odoo/addons/base/data/ir_module_module.xml b/odoo/addons/base/data/ir_module_module.xml index 7579260be25..058a7880b3a 100644 --- a/odoo/addons/base/data/ir_module_module.xml +++ b/odoo/addons/base/data/ir_module_module.xml @@ -245,5 +245,15 @@ /base/static/img/icons/website_twitter_wall.png + + payment_sepa_direct_debit + Sepa Direct Debit Payment Acquirer + Checkout with SEPA Direct Debit + + OEEL-1 + Odoo S.A. + + /base/static/img/icons/payment_sepa_direct_debit.png + diff --git a/odoo/addons/base/static/img/icons/payment_sepa_direct_debit.png b/odoo/addons/base/static/img/icons/payment_sepa_direct_debit.png new file mode 100644 index 00000000000..aec41dd1658 Binary files /dev/null and b/odoo/addons/base/static/img/icons/payment_sepa_direct_debit.png differ