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
This commit is contained in:
Cédric Krier
2024-02-05 18:57:28 +01:00
parent ea9740846e
commit fa7ec2eecd
+3 -1
View File
@@ -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):