Skip to content

Commit

Permalink
fix: search in display_name default name_search res.partner
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisOForgeFlow committed Apr 12, 2023
1 parent 6c0c2f3 commit aca9534
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions account_payment_line_import/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ def load(self, fields, data):
invoice_id = int(line[2])
invoice = account_move.browse(invoice_id)
line[2] = invoice.name
line.append(invoice.partner_id.name)
line.append(invoice.partner_id.display_name)
# Account
if len(line[4]) == 0:
if current_payment.destination_account_id:
line[4] = current_payment.destination_account_id.code
# If partner not on invoice search by ID
if len(line) != len(fields):
line.append(current_partner.name)
line.append(current_partner.display_name)
new_data.append(line)
data = new_data
return super().load(fields, data)
Expand Down

0 comments on commit aca9534

Please sign in to comment.