diff --git a/addons/payment/i18n/payment.pot b/addons/payment/i18n/payment.pot index 0e60dda36458c..050e176fe57ae 100644 --- a/addons/payment/i18n/payment.pot +++ b/addons/payment/i18n/payment.pot @@ -1007,6 +1007,12 @@ msgstr "" msgid "Never" msgstr "" +#. module: payment +#: code:addons/payment/wizards/payment_acquirer_onboarding_wizard.py:127 +#, python-format +msgid "No manual payment method could be found for this company. Please create one from the Payment Acquirer menu." +msgstr "" + #. module: payment #: model_terms:ir.ui.view,arch_db:payment.pay msgid "No payment acquirer found." diff --git a/addons/payment/wizards/payment_acquirer_onboarding_wizard.py b/addons/payment/wizards/payment_acquirer_onboarding_wizard.py index 35b0d4b73642c..57f271fdffb9f 100644 --- a/addons/payment/wizards/payment_acquirer_onboarding_wizard.py +++ b/addons/payment/wizards/payment_acquirer_onboarding_wizard.py @@ -123,6 +123,11 @@ def add_payment_methods(self): }) if self.payment_method == 'manual': manual_acquirer = self._get_manual_payment_acquirer(new_env) + if not manual_acquirer: + raise UserError(_( + 'No manual payment method could be found for this company. ' + + 'Please create one from the Payment Acquirer menu.' + )) manual_acquirer.name = self.manual_name manual_acquirer.post_msg = self.manual_post_msg manual_acquirer.website_published = True