Ensure current record has been saved before execute button action
(grafted from 8d4e44642bd96d29436f327eb9eba591214fb7e7) --HG-- branch : 7.0
This commit is contained in:
1 parent
f30d8934cb
commit
ec568c1e79
1 file changed
+2
-1
@@ -1228,7 +1228,8 @@ class Screen:
|
||||
if button.get('confirm', False) and not sur(button['confirm']):
|
||||
return
|
||||
if button.get('type', 'class') == 'class':
|
||||
if not self.current_record.save(force_reload=False):
|
||||
record_id = self.current_record.save(force_reload=False)
|
||||
if record_id is False or record_id < 0:
|
||||
return
|
||||
if button.get('type', 'class') == 'class':
|
||||
self._button_class(button)
|
||||
|
||||
Reference in new issue
Block a user