details:   https://code.tryton.org/tryton/commit/8c1fc889929d
branch:    default
user:      Cédric Krier <[email protected]>
date:      Thu Jun 18 15:42:24 2026 +0200
description:
        Search for the record name of the contact mechanism using the 'name' 
field

        Closes #14902
diffstat:

 modules/party/contact_mechanism.py |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 6b8e5ff7a275 -r 8c1fc889929d modules/party/contact_mechanism.py
--- a/modules/party/contact_mechanism.py        Wed Jun 10 19:10:53 2026 +0200
+++ b/modules/party/contact_mechanism.py        Thu Jun 18 15:42:24 2026 +0200
@@ -298,13 +298,15 @@
 
     @classmethod
     def search_rec_name(cls, name, clause):
-        if clause[1].startswith('!') or clause[1].startswith('not '):
+        operator = clause[1]
+        if operator.startswith('!') or operator.startswith('not '):
             bool_op = 'AND'
         else:
             bool_op = 'OR'
         return [bool_op,
-            ('value',) + tuple(clause[1:]),
-            ('value_compact',) + tuple(clause[1:]),
+            ('value', *clause[1:]),
+            ('value_compact', *clause[1:]),
+            ('name', *clause[1:]),
             ]
 
     def compute_fields(self, field_names=None):

Reply via email to