From 12c51fa3c47bf2d001ce907ea61571bfdc437ea8 Mon Sep 17 00:00:00 2001 From: Leonardo Pistone Date: Thu, 30 Jan 2014 14:01:20 +0100 Subject: [PATCH] [fix] copy the context before modifying it: safer upstream --- account_statement_ext/statement.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/account_statement_ext/statement.py b/account_statement_ext/statement.py index 4c249a37..e2c7cddd 100644 --- a/account_statement_ext/statement.py +++ b/account_statement_ext/statement.py @@ -216,8 +216,9 @@ class AccountBankSatement(Model): if context is None: context = {} period_obj = self.pool.get('account.period') - context['account_period_prefer_normal'] = True - periods = period_obj.find(cr, uid, dt=date, context=context) + local_context = context.copy() + local_context['account_period_prefer_normal'] = True + periods = period_obj.find(cr, uid, dt=date, context=local_context) return periods and periods[0] or False def _check_company_id(self, cr, uid, ids, context=None):