diff --git a/account_statement_base_completion/__init__.py b/account_statement_base_completion/__init__.py index f6c46966..3397bf58 100644 --- a/account_statement_base_completion/__init__.py +++ b/account_statement_base_completion/__init__.py @@ -19,4 +19,5 @@ # ############################################################################## -import statement \ No newline at end of file +import statement +import partner \ No newline at end of file diff --git a/account_statement_base_completion/statement.py b/account_statement_base_completion/statement.py index 551707ac..9573ec1e 100644 --- a/account_statement_base_completion/statement.py +++ b/account_statement_base_completion/statement.py @@ -209,7 +209,7 @@ class AccountStatementCompletionRule(Model): compt = 0 if st_line: ids = partner_obj.search(cursor, uid, [['bank_statement_label', '!=', False]], context=context) - for partner in self.browse(cursor, uid, ids, context=context): + for partner in partner_obj.browse(cursor, uid, ids, context=context): for partner_label in partner.bank_statement_label.split(';'): if partner_label in st_line.label: compt += 1 diff --git a/account_statement_base_import/wizard/import_statement.py b/account_statement_base_import/wizard/import_statement.py index 0c76946b..574a8979 100644 --- a/account_statement_base_import/wizard/import_statement.py +++ b/account_statement_base_import/wizard/import_statement.py @@ -110,6 +110,11 @@ class CreditPartnerStatementImporter(osv.osv_memory): ftype.replace('.',''), context=context ) - - # We should return here the profile for which we executed the import - return {'type': 'ir.actions.act_window_close'} + return { + 'domain': "[('id','in', ["+','.join(map(str,[sid]))+"])]", + 'name': 'Imported Bank Statement', + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': 'account.bank.statement', + 'type': 'ir.actions.act_window', + } diff --git a/account_statement_transactionid_completion/data.xml b/account_statement_transactionid_completion/data.xml index e44e9fe6..09460078 100644 --- a/account_statement_transactionid_completion/data.xml +++ b/account_statement_transactionid_completion/data.xml @@ -4,7 +4,7 @@ Match from line reference (based on transaction ID) - 40 + 30 get_from_transaction_id_and_so