From 78cc8bcce42f4c750955c124def0a69f372888a2 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 4 Nov 2019 22:54:56 +0100 Subject: [PATCH] [MIG] account_bank_statement_import_move_line: Fix tests + URL --- account_bank_statement_import_move_line/__manifest__.py | 2 +- .../tests/test_account_bank_statement_import_move_line.py | 8 ++------ .../wizards/account_statement_line_create.py | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/account_bank_statement_import_move_line/__manifest__.py b/account_bank_statement_import_move_line/__manifest__.py index ac1e9b3..e779529 100644 --- a/account_bank_statement_import_move_line/__manifest__.py +++ b/account_bank_statement_import_move_line/__manifest__.py @@ -9,7 +9,7 @@ 'author': 'Tecnativa, ' 'Odoo Community Association (OCA)', 'maintainers': ['pedrobaeza'], - 'website': 'https://www.tecnativa.com', + 'website': 'https://github.com/OCA/bank-statement-import', 'depends': [ 'account', ], diff --git a/account_bank_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py b/account_bank_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py index 0c3f403..f2eb42f 100644 --- a/account_bank_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py +++ b/account_bank_statement_import_move_line/tests/test_account_bank_statement_import_move_line.py @@ -60,12 +60,8 @@ class TestAccountBankStatementImportMoveLine(common.SavepointCase): 'invoice': False, }) wizard.populate() - self.assertTrue(len(wizard.move_line_ids), 2) - wizard.invoice = True - wizard.move_line_filters_change() - wizard.populate() - self.assertTrue(len(wizard.move_line_ids), 1) - line = wizard.move_line_ids[0] + self.assertEqual(len(wizard.move_line_ids), 1) + line = wizard.move_line_ids self.assertEqual(line.debit, self.invoice.amount_total) wizard.create_statement_lines() line = self.statement.line_ids[0] diff --git a/account_bank_statement_import_move_line/wizards/account_statement_line_create.py b/account_bank_statement_import_move_line/wizards/account_statement_line_create.py index 8da2362..7a2e9d6 100644 --- a/account_bank_statement_import_move_line/wizards/account_statement_line_create.py +++ b/account_bank_statement_import_move_line/wizards/account_statement_line_create.py @@ -89,6 +89,7 @@ class AccountStatementLineCreate(models.TransientModel): def populate(self): domain = self._prepare_move_line_domain() lines = self.env['account.move.line'].search(domain) + self.move_line_ids = False self.move_line_ids = lines action = { 'name': _('Select Move Lines to Create Statement'),