diff --git a/payment_multic_ux/models/payment_provider.py b/payment_multic_ux/models/payment_provider.py index c581cc74..fc8efa16 100644 --- a/payment_multic_ux/models/payment_provider.py +++ b/payment_multic_ux/models/payment_provider.py @@ -27,7 +27,10 @@ def _link_payment_method_to_journal(self, provider): code = provider._get_code() default_payment_method_id = provider._get_default_payment_method_id(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) + existing_payment_method_line = self.env['account.payment.method.line'].search([ + ('journal_id.company_id', '=', provider.journal_id.company_id.id), + ('payment_method_id', '=', default_payment_method_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,