From 9f65dad250127fe2699a27e1e3b6325bd0838885 Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Wed, 2 Dec 2015 14:03:08 +0100 Subject: [PATCH] [FIX] stock: mutation of the context If the method do_enter_transfer_details is called form the new API, the context is a frozendict and can not be updated and the previous code would crash. Copying it before updating. Closes #9872 --- addons/stock/stock.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 2e372b7ae58..98a15b5ab7c 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1406,7 +1406,8 @@ class stock_picking(osv.osv): def do_enter_transfer_details(self, cr, uid, picking, context=None): if not context: context = {} - + else: + context = context.copy() context.update({ 'active_model': self._name, 'active_ids': picking,