Do not strip wildcard for number clause when searching work per record name

The strip of wildcard is usually applied for code not number.

Closes #14882
(grafted from f8cac4c04b0b59a056775358e18c48a5c5871f53)

--HG--
branch : 8.0
This commit is contained in:
Cédric Krier
2026-06-11 10:37:29 +02:00
parent 16005ba031
commit c31f99b670
+1 -5
View File
@@ -15,7 +15,6 @@ from trytond.model import (
from trytond.modules.company.model import CompanyMultiValueMixin
from trytond.pool import Pool
from trytond.pyson import Bool, Eval, Id, If, PYSONEncoder, TimeDelta
from trytond.tools import is_full_text, lstrip_wildcard
from trytond.transaction import Transaction
from .exceptions import WorkProgressValidationError
@@ -491,11 +490,8 @@ class Work(
bool_op = 'AND'
else:
bool_op = 'OR'
code_value = value
if operator.endswith('like') and is_full_text(value):
code_value = lstrip_wildcard(value)
domain = [bool_op,
('number', operator, code_value),
('number', operator, value),
super().search_rec_name(name, clause),
]
return domain