From 2ab19cf6eb834ec24254035d2013f1d24e5342c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 23 Dec 2025 09:52:40 +0100 Subject: [PATCH] Save wizard session states in new transaction for readonly wizard The transaction is readonly which prevents to save in the database the session with states. Closes #14442 --- trytond/trytond/wizard/wizard.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trytond/trytond/wizard/wizard.py b/trytond/trytond/wizard/wizard.py index 7cf830e1a5..43ff98e5fb 100644 --- a/trytond/trytond/wizard/wizard.py +++ b/trytond/trytond/wizard/wizard.py @@ -352,7 +352,11 @@ class Wizard(URLMixin, PoolBase): wizard.model.log( wizard.records, 'wizard', f'{cls.__name__}:{state_name}') - wizard._save() + if transaction.readonly: + with transaction.new_transaction(): + wizard._save() + else: + wizard._save() return result def _execute(self, state_name):