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
This commit is contained in:
Cédric Krier
2025-12-23 09:52:40 +01:00
parent 66dceea550
commit 2ab19cf6eb
+5 -1
View File
@@ -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):