From 9a11b67d6a8b9f94f47319d7793721c21f782b75 Mon Sep 17 00:00:00 2001 From: "Laurent Mignon (ACSONE)" Date: Tue, 17 Mar 2015 17:36:37 +0100 Subject: [PATCH] [FIX]Take a copy of the context before update If the method `import_file` is called with the new API, the context is a frozendict and the update will raise `NotImplementedError: 'update' not supported on frozendict` PR on master: https://github.com/odoo/odoo/pull/5798 --- account_bank_statement_import/account_bank_statement_import.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/account_bank_statement_import/account_bank_statement_import.py b/account_bank_statement_import/account_bank_statement_import.py index ff1252d..9283576 100644 --- a/account_bank_statement_import/account_bank_statement_import.py +++ b/account_bank_statement_import/account_bank_statement_import.py @@ -35,8 +35,7 @@ class account_bank_statement_import(osv.TransientModel): def import_file(self, cr, uid, ids, context=None): """ Process the file chosen in the wizard, create bank statement(s) and go to reconciliation. """ - if context is None: - context = {} + context = dict(context or {}) #set the active_id in the context, so that any extension module could #reuse the fields chosen in the wizard if needed (see .QIF for example) context.update({'active_id': ids[0]})