Close tab when cancelling save on new record
issue10480 review363421002 (grafted from 941b90300b84c9116138ce8275e662e3dd792182) --HG-- branch : 6.0
This commit is contained in:
1 parent
d1b964aa33
commit
1fcd621c8e
1 file changed
+5
-4
@@ -667,17 +667,18 @@ class Form(SignalEvent, TabContent):
|
||||
if value == 'ko':
|
||||
record_id = self.screen.current_record.id
|
||||
if self.sig_reload(test_modified=False):
|
||||
if self.screen.current_record:
|
||||
if record_id < 0:
|
||||
return None
|
||||
elif self.screen.current_record:
|
||||
return record_id == self.screen.current_record.id
|
||||
elif record_id < 0:
|
||||
return True
|
||||
return False
|
||||
return True
|
||||
|
||||
def sig_close(self, widget=None):
|
||||
for dialog in reversed(self.dialogs[:]):
|
||||
dialog.destroy()
|
||||
return self.modified_save()
|
||||
modified_save = self.modified_save()
|
||||
return True if modified_save is None else modified_save
|
||||
|
||||
def _action(self, action, atype):
|
||||
if not self.modified_save():
|
||||
|
||||
Reference in new issue
Block a user