From 618f20d4538189b52c179eb11b847bf0bc54b780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Tue, 24 Sep 2024 16:37:50 +0200 Subject: [PATCH] Return the display promise when creating a new record from the screen This is necessary because otherwise it could result in concurrent update of the models of the models used by the underlying widgets. Closes #13545 --- sao/src/screen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sao/src/screen.js b/sao/src/screen.js index 48e612faff..df8c1df4cf 100644 --- a/sao/src/screen.js +++ b/sao/src/screen.js @@ -1545,10 +1545,10 @@ if (previous_view.view_type == 'calendar') { previous_view.set_default_date(record, selected_date); } - this.display().done(() => { + return this.display().then(() => { this.set_cursor(true, true); + return record; }); - return record; }); }); },