diff --git a/account_statement_import_move_line/models/account_move_line.py b/account_statement_import_move_line/models/account_move_line.py index af88721c..a268ddf6 100644 --- a/account_statement_import_move_line/models/account_move_line.py +++ b/account_statement_import_move_line/models/account_move_line.py @@ -19,7 +19,7 @@ class AccountMoveLine(models.Model): "amount": amount, "partner_id": self.partner_id.id, "statement_id": statement.id, - "payment_ref": self.ref, + "payment_ref": self.ref or self.name, "date": self.date_maturity, "currency_id": self.currency_id.id, } diff --git a/account_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py b/account_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py index 9ac23f84..fe0891aa 100644 --- a/account_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py +++ b/account_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py @@ -37,7 +37,6 @@ class TestAccountBankStatementImportMoveLine(TransactionCase): "partner_id": cls.partner.id, "move_type": "out_invoice", "journal_id": cls.journal.id, - "ref": "Test", "invoice_line_ids": [ ( 0,