From ef297a8cd141301469ca0bfedf2fb4b12d2cfd13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 30 Mar 2018 18:15:04 +0200 Subject: [PATCH] Deep copy the context before modifying in RPC issue7287 review46271002 --- trytond/rpc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trytond/rpc.py b/trytond/rpc.py index 72357eb3b0..e0d3959d49 100644 --- a/trytond/rpc.py +++ b/trytond/rpc.py @@ -1,5 +1,7 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. +import copy + from trytond.transaction import Transaction __all__ = ['RPC'] @@ -34,6 +36,7 @@ class RPC(object): context = kwargs.pop('context') else: context = args.pop() + context = copy.deepcopy(context) timestamp = None for key in context.keys(): if key == '_timestamp':