From bd9df98fe78893759e70af3738d1726b4580b8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 25 Feb 2009 12:41:20 +0100 Subject: [PATCH] Store a copy of selection if possible for issue810 --- trytond/model/fields/selection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trytond/model/fields/selection.py b/trytond/model/fields/selection.py index d2e989452e..3b9bd872a2 100644 --- a/trytond/model/fields/selection.py +++ b/trytond/model/fields/selection.py @@ -9,6 +9,9 @@ class Selection(Field): def __init__(self, selection, string='', sort=True, translate=True, **args): super(Selection, self).__init__(string=string, **args) - self.selection = selection + if hasattr(selection, 'copy'): + self.selection = selection.copy() + else: + self.selection = selection self.sort = sort self.translate_selection = translate