summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Mignon (ACSONE) <laurent.mignon@acsone.eu>2015-03-17 17:29:18 +0100
committerXavier Morel <xmo@odoo.com>2015-03-19 10:02:45 +0100
commitcafcd65b6dc8454daf30f797341fc7276ccda76e (patch)
treeda7f16c661de8b11acf1254ed5c88e10f10849d6
parent21e38e3851fe9036743d9112d7597661e059214b (diff)
[FIX] Take a copy of the context.
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` closes #5798
-rw-r--r--addons/account_bank_statement_import/account_bank_statement_import.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/account_bank_statement_import/account_bank_statement_import.py b/addons/account_bank_statement_import/account_bank_statement_import.py
index 6a39a6a2920..523c6c9d38c 100644
--- a/addons/account_bank_statement_import/account_bank_statement_import.py
+++ b/addons/account_bank_statement_import/account_bank_statement_import.py
@@ -33,8 +33,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]})