diff --git a/payment_multic_ux/models/payment_provider.py b/payment_multic_ux/models/payment_provider.py index 9ec68e23..2c5f3785 100644 --- a/payment_multic_ux/models/payment_provider.py +++ b/payment_multic_ux/models/payment_provider.py @@ -27,9 +27,10 @@ def _link_payment_method_to_journal(self, provider): code = provider._get_code() default_payment_method_id = provider._get_provider_payment_method(provider._get_code()) # cambio el dominio de búsqueda sino no me detecta el existing_payment_method_line y me lo duplica - existing_payment_method_line = self.env['account.payment.method.line'].search([('journal_id.company_id', '=', provider.company_id.id),('code', '=', provider.code),('payment_method_id', '=', default_payment_method_id),('code', '=', code),], limit=1) + import pdb; pdb.set_trace() + existing_payment_method_line = self.env['account.payment.method.line'].search([('journal_id.company_id', '=', provider.company_id.id),('code', '=', provider.code),('payment_method_id', '=', default_payment_method_id.id),('code', '=', code),], limit=1) if not existing_payment_method_line: self.env['account.payment.method.line'].create({ - 'payment_method_id': default_payment_method_id, + 'payment_method_id': default_payment_method_id.id, 'journal_id': provider.journal_id.id, })