Do not execute button if there is no current record for the screen
This commit is contained in:
@@ -2041,6 +2041,10 @@
|
||||
}
|
||||
};
|
||||
|
||||
if (!this.current_record) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.current_view) {
|
||||
var selected_records = this.current_view.selected_records;
|
||||
this.current_view.set_value();
|
||||
|
||||
@@ -1257,6 +1257,9 @@ class Screen:
|
||||
|
||||
def button(self, button):
|
||||
'Execute button on the selected records'
|
||||
if not self.current_record:
|
||||
return
|
||||
|
||||
if self.current_view:
|
||||
self.current_view.set_value()
|
||||
fields = self.current_view.get_fields()
|
||||
|
||||
Reference in New Issue
Block a user