Fix reload of screen at the end of wizard
A wizard could be launch by a button defined on a children record. In this case, the ids to reload is not the ids from the wizard as they are from the children model but just the current record. issue3519 review2571002 (transplanted from 6f657eeefffcc5a74be70e7cc8868fc7293d3c44)
This commit is contained in:
1 parent
39d430c602
commit
c8112db48b
1 file changed
+7
-3
@@ -349,9 +349,13 @@ class WizardDialog(Wizard, NoModal):
|
||||
dialog = self.page
|
||||
if (hasattr(dialog, 'screen')
|
||||
and dialog.screen.current_record
|
||||
and self.sensible_widget != main.window
|
||||
and self.ids):
|
||||
dialog.screen.reload(self.ids, written=True)
|
||||
and self.sensible_widget != main.window):
|
||||
if dialog.screen.model_name == self.model:
|
||||
ids = self.ids
|
||||
else:
|
||||
# Wizard run from a children record so reload parent record
|
||||
ids = [dialog.screen.current_record.id]
|
||||
dialog.screen.reload(ids, written=True)
|
||||
|
||||
def end(self):
|
||||
super(WizardDialog, self).end()
|
||||
|
||||
Reference in new issue
Block a user