details: https://code.tryton.org/tryton/commit/04c731b3d63d
branch: 7.0
user: Cédric Krier <[email protected]>
date: Wed Dec 17 16:13:44 2025 +0100
description:
Do not notify for duplicate identifier from the same party
Closes #14434
(grafted from 33e65be32c54cf8ba9f2fb680541ef74aec7b420)
diffstat:
modules/party/party.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (19 lines):
diff -r bf062fb93b8d -r 04c731b3d63d modules/party/party.py
--- a/modules/party/party.py Wed Dec 24 11:38:45 2025 +0100
+++ b/modules/party/party.py Wed Dec 17 16:13:44 2025 +0100
@@ -851,13 +851,14 @@
notifications.extend(self._notify_duplicate())
return notifications
- @fields.depends('code', methods=['on_change_with_code'])
+ @fields.depends('party', 'code', methods=['on_change_with_code'])
def _notify_duplicate(self):
cls = self.__class__
if self.code:
code = self.on_change_with_code()
others = cls.search([
('id', '!=', self.id),
+ ('party', '!=', self.party),
('type', '!=', None),
('code', '=', code),
], limit=1)