From 282da30bfd54ac22f30efd4f1485f3201c145256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 5 Feb 2024 18:57:28 +0100 Subject: [PATCH] Increase transaction counter when erasing party As the erase is done using direct SQL query, the counter is not increased so there is no log event created because the wizard use the counter to determine if there were some modification and thus create a log entry. Closes #13002 (grafted from c1f76346bda026970d8f964f7198dd55e4c1cdc7) --HG-- branch : 7.0 --- modules/party/party.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/party/party.py b/modules/party/party.py index 93c28a3368..0eb63ba95f 100644 --- a/modules/party/party.py +++ b/modules/party/party.py @@ -1071,7 +1071,8 @@ class Erase(Wizard): def transition_erase(self): pool = Pool() Party = pool.get('party.party') - cursor = Transaction().connection.cursor() + transaction = Transaction() + cursor = transaction.connection.cursor() resources = self.get_resources() parties = replacing = [self.ask.party] @@ -1124,6 +1125,7 @@ class Erase(Wizard): Model.__name__ + ',%') & resource_field.sql_id( table.resource, Model).in_(query))) + transaction.counter += 1 return 'end' def check_erase(self, party):