mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[MIG] account_bank_statement_import_move_line: Fix tests + URL
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
'author': 'Tecnativa, '
|
'author': 'Tecnativa, '
|
||||||
'Odoo Community Association (OCA)',
|
'Odoo Community Association (OCA)',
|
||||||
'maintainers': ['pedrobaeza'],
|
'maintainers': ['pedrobaeza'],
|
||||||
'website': 'https://www.tecnativa.com',
|
'website': 'https://github.com/OCA/bank-statement-import',
|
||||||
'depends': [
|
'depends': [
|
||||||
'account',
|
'account',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -60,12 +60,8 @@ class TestAccountBankStatementImportMoveLine(common.SavepointCase):
|
|||||||
'invoice': False,
|
'invoice': False,
|
||||||
})
|
})
|
||||||
wizard.populate()
|
wizard.populate()
|
||||||
self.assertTrue(len(wizard.move_line_ids), 2)
|
self.assertEqual(len(wizard.move_line_ids), 1)
|
||||||
wizard.invoice = True
|
line = wizard.move_line_ids
|
||||||
wizard.move_line_filters_change()
|
|
||||||
wizard.populate()
|
|
||||||
self.assertTrue(len(wizard.move_line_ids), 1)
|
|
||||||
line = wizard.move_line_ids[0]
|
|
||||||
self.assertEqual(line.debit, self.invoice.amount_total)
|
self.assertEqual(line.debit, self.invoice.amount_total)
|
||||||
wizard.create_statement_lines()
|
wizard.create_statement_lines()
|
||||||
line = self.statement.line_ids[0]
|
line = self.statement.line_ids[0]
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ class AccountStatementLineCreate(models.TransientModel):
|
|||||||
def populate(self):
|
def populate(self):
|
||||||
domain = self._prepare_move_line_domain()
|
domain = self._prepare_move_line_domain()
|
||||||
lines = self.env['account.move.line'].search(domain)
|
lines = self.env['account.move.line'].search(domain)
|
||||||
|
self.move_line_ids = False
|
||||||
self.move_line_ids = lines
|
self.move_line_ids = lines
|
||||||
action = {
|
action = {
|
||||||
'name': _('Select Move Lines to Create Statement'),
|
'name': _('Select Move Lines to Create Statement'),
|
||||||
|
|||||||
Reference in New Issue
Block a user