- In order to test the banking framework, I first need to create a profile - !record {model: account.statement.profile, id: statement_profile_transactionid}: name: Bank EUR Profile (transaction ID) journal_id: account.bank_journal commission_account_id: account.a_expense company_id: base.main_company balance_check: True rule_ids: - bank_statement_completion_rule_4 - account_statement_base_completion.bank_statement_completion_rule_4 - account_statement_base_completion.bank_statement_completion_rule_5 - account_statement_base_completion.bank_statement_completion_rule_2 - account_statement_base_completion.bank_statement_completion_rule_3 - Now I create a statement. I create statment lines separately because I need to find each one by XML id - !record {model: account.bank.statement, id: statement_transactionid_test1}: name: Statement with transaction ID profile_id: statement_profile_transactionid company_id: base.main_company - I create a statement line for a SO with transaction ID - !record {model: account.bank.statement.line, id: statement_line_transactionid}: name: Test autocompletion based on SO with transaction ID statement_id: statement_transactionid_test1 transaction_id: XXX66Z ref: 6 date: !eval "'%s-01-06' %(datetime.now().year)" amount: 118.4 - I run the auto complete - !python {model: account.bank.statement}: | result = self.button_auto_completion(cr, uid, [ref("statement_transactionid_test1")]) - Now I can check that all is nice and shiny, line 1. I expect the SO has been recognised from the transaction ID. - !assert {model: account.bank.statement.line, id: statement_line_transactionid, string: Check completion by SO transaction ID}: - partner_id.name == u'Agrolait'