diff --git a/sao/src/screen.js b/sao/src/screen.js index 4cbd32226d..3a9e2a086d 100644 --- a/sao/src/screen.js +++ b/sao/src/screen.js @@ -1627,6 +1627,7 @@ }, save_current: function() { var current_record = this.current_record; + let new_record = current_record.id < 0; if (!current_record) { if (this.current_view && (this.current_view.view_type == 'tree') && @@ -1664,6 +1665,9 @@ path.splice(-1, 1, [path[path.length - 1][0], current_record.id]); } + if (new_record && this.switch_callback) { + this.switch_callback(); + } return this.group.get_by_path(path).then(record => { this.current_record = record; });