From 75931c4bf8bd3a2212e53f32362e69346d55be09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 7 Feb 2012 17:35:21 +0100 Subject: [PATCH] Set session state dirty if updated When updating session with data from the client, the states must be mark as dirty to be saved in the database at the end of the process. issue2421 --- trytond/wizard/wizard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trytond/wizard/wizard.py b/trytond/wizard/wizard.py index aed91f062d..a72f2a94dc 100644 --- a/trytond/wizard/wizard.py +++ b/trytond/wizard/wizard.py @@ -328,7 +328,10 @@ class Wizard(WarningErrorMixin, URLMixin): if isinstance(session, (int, long)): session = Session(self, session) for key, value in data.iteritems(): + prev_data = session.data[key].copy() session.data[key].update(value) + if prev_data != session.data[key]: + getattr(session, key).dirty = True state = self.states[state_name] result = {}