From 1fca0d85b63f72dce62144eb3fea054db4c7507c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 16 Sep 2014 10:05:05 +0200 Subject: [PATCH] Use the right record to set wizard button state When the wizard receive the record-modified signal, current_record is not yet set on the screen so we must use the record from the signal to set the button state. issue4171 review7581002 --- tryton/gui/window/view_form/screen/screen.py | 4 ++-- tryton/gui/window/wizard.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tryton/gui/window/view_form/screen/screen.py b/tryton/gui/window/view_form/screen/screen.py index 33f8c16154..0604b1bbb7 100644 --- a/tryton/gui/window/view_form/screen/screen.py +++ b/tryton/gui/window/view_form/screen/screen.py @@ -277,8 +277,8 @@ class Screen(SignalEvent): if hasattr(view, 'group_list_changed'): view.group_list_changed(group, signal) - def _record_modified(self, group, signal, *args): - self.signal('record-modified') + def _record_modified(self, group, signal): + self.signal('record-modified', signal) def _group_changed(self, group, record): if not self.parent: diff --git a/tryton/gui/window/wizard.py b/tryton/gui/window/wizard.py index 55b34f5689..64f143ba23 100644 --- a/tryton/gui/window/wizard.py +++ b/tryton/gui/window/wizard.py @@ -150,8 +150,7 @@ class Wizard(object): button.show() return button - def _record_modified(self, screen, signal): - record = screen.current_record + def _record_modified(self, screen, record): for button in self.states.itervalues(): button.state_set(record)