diff --git a/product/ERP5/Tool/DomainTool.py b/product/ERP5/Tool/DomainTool.py
index 0c95be3d7922956f277fe229b2fef255afe7a788..15188e33ee5d59735ec11cace331c0ba45b3cf0f 100644
--- a/product/ERP5/Tool/DomainTool.py
+++ b/product/ERP5/Tool/DomainTool.py
@@ -122,9 +122,9 @@ class DomainTool(BaseTool):
                           "OR ((%(base_name)s_range_min <= '%(value)s') AND " \
                               "(%(base_name)s_range_max is NULL)) " \
                           "OR ((%(base_name)s_range_min is NULL) AND " \
-                              "%(base_name)s_range_max > '%(value)s)' " \
+                              "%(base_name)s_range_max > '%(value)s') " \
                           "OR ((%(base_name)s_range_min <= '%(value)s') AND " \
-                              "%(base_name)s_range_max > '%(value)s)' " \
+                              "%(base_name)s_range_max > '%(value)s') " \
                             % format_dict
             expression = '( %s )' % expression
             expression_list.append(expression)