From a72acf040277a0a5010d1197d48e2d55de336a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 30 Aug 2023 15:50:30 +0200 Subject: [PATCH] Do not use save button for readonly screen Even if save_current is set, a readonly screen is never saved on response. Closes #12538 --- sao/src/window.js | 9 ++++----- tryton/tryton/gui/window/win_form.py | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sao/src/window.js b/sao/src/window.js index d7e1d81dbd..dfd869f345 100644 --- a/sao/src/window.js +++ b/sao/src/window.js @@ -179,8 +179,7 @@ } }); - var readonly = (this.screen.attributes.readonly || - this.screen.group.readonly); + var readonly = this.screen.readonly || this.screen.group.readonly; this.but_ok = null; this.but_new = null; @@ -223,7 +222,7 @@ })); } - if (this.save_current) { + if (this.save_current && !readonly) { this.but_ok = jQuery('