details: https://code.tryton.org/tryton/commit/6adbcfdf4dce
branch: default
user: Cédric Krier <[email protected]>
date: Wed Oct 14 13:49:09 2026 +0200
description:
Add a WHERE clause to limit the rows for which the party is being
replaced
Closes #15169
diffstat:
modules/party/party.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (22 lines):
diff -r d8a9c4564808 -r 6adbcfdf4dce modules/party/party.py
--- a/modules/party/party.py Wed Oct 14 13:33:23 2026 +0200
+++ b/modules/party/party.py Wed Oct 14 13:49:09 2026 +0200
@@ -1252,6 +1252,7 @@
source_value = source.id
destination_value = destination.id
where = column == source_value
+ where &= self.where_to_replace(model_name, field_name, table)
if transaction.database.has_returning():
returning = [table.id]
@@ -1280,6 +1281,10 @@
('party.identifier', 'party'),
]
+ def where_to_replace(self, model, field, table):
+ "Return an SQL clause to restrict rows to replace"
+ return Literal(True)
+
class ReplaceAsk(ModelView):
__name__ = 'party.replace.ask'