IDEMPIERE-2923 Fields with value starting with a single quote cannot be searched

This commit is contained in:
Carlos Ruiz 2015-11-11 11:13:34 -05:00
parent 4ea156784c
commit f5da9f0721
1 changed files with 2 additions and 2 deletions

View File

@ -1025,11 +1025,11 @@ class Restriction implements Serializable
// clean code
if (Code instanceof String)
{
if (Code.toString().startsWith("'"))
if (Code.toString().startsWith("'") && Code.toString().endsWith("'")) {
Code = Code.toString().substring(1);
if (Code.toString().endsWith("'"))
Code = Code.toString().substring(0, Code.toString().length()-2);
}
}
if (infoDisplay != null)
InfoDisplay = infoDisplay.trim();
else if (code != null)