From fa7ec2eecd745f2746b88ef50ac72cdc8b2d594e 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 --- 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 f45e197545..7923c22089 100644 --- a/modules/party/party.py +++ b/modules/party/party.py @@ -1093,7 +1093,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] @@ -1146,6 +1147,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):