[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
This commit is contained in:
committed by
Xavier Morel
parent
21e38e3851
commit
cafcd65b6d
@@ -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]})
|
||||
|
||||
Reference in New Issue
Block a user