From 07dea7ba4542f9a11cdb7e752b9cb961eabd28fa Mon Sep 17 00:00:00 2001 From: althaf shaik Date: Wed, 9 Aug 2023 13:30:05 +0000 Subject: [PATCH] [FIX] account_payment: handle error while computing suitable payment token This traceback may arise while computing suitable payment tokens, when a user clicks register payment in invoice. Because in '_compute_suitable_payment_token_ids' method, instead of 'paymet.token' 'payment.tokeb' is used. Which is an invalid model name. It leads to keyerror Error: 'KeyError: 'payment.tokeb'' See: https://github.com/odoo/odoo/blob/60598dff9d8482bcea2f32fea6df1b1b71c760d6/addons/account_payment/wizards/account_payment_register.py#L36-L41 sentry-4380761438 closes odoo/odoo#132725 X-original-commit: f169d92454bba61547dc5bbbc3a6f9c45798562e Signed-off-by: Achraf Ben Azzouz (abz) --- addons/account_payment/wizards/account_payment_register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_payment/wizards/account_payment_register.py b/addons/account_payment/wizards/account_payment_register.py index f695ed6dfea..5a4189c4aef 100644 --- a/addons/account_payment/wizards/account_payment_register.py +++ b/addons/account_payment/wizards/account_payment_register.py @@ -37,7 +37,7 @@ class AccountPaymentRegister(models.TransientModel): for wizard in self: if wizard.can_edit_wizard and wizard.use_electronic_payment_method: wizard.suitable_payment_token_ids = self.env['payment.token'].sudo().search([ - *self.env['payment.tokeb']._check_company_domain(wizard.company_id), + *self.env['payment.token']._check_company_domain(wizard.company_id), ('provider_id.capture_manually', '=', False), ('partner_id', '=', wizard.partner_id.id), ('provider_id', '=', wizard.payment_method_line_id.payment_provider_id.id),