diff --git a/CHANGELOG b/CHANGELOG index fa5e39fcb5..d668b859d6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Change range operator of search widget to be included * Explicitly set value of parent field Version 3.2.0 - 2014-04-21 diff --git a/doc/usage.rst b/doc/usage.rst index 16f01203ca..166099518c 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -794,8 +794,7 @@ A range of number values can be set using `..`. For example: ``Amount: 100..500`` - It will find all records with `Amount` between `100` and `500` (left - included and right excluded) + It will find all records with `Amount` between `100` and `500` included. There are two wildcards: diff --git a/tryton/common/domain_parser.py b/tryton/common/domain_parser.py index 935b2451f1..24e2eb8460 100644 --- a/tryton/common/domain_parser.py +++ b/tryton/common/domain_parser.py @@ -1082,7 +1082,7 @@ class DomainParser(object): rvalue = convert_value(field, rvalue) yield iter([ (field_name, '>=', lvalue), - (field_name, '<', rvalue), + (field_name, '<=', rvalue), ]) continue if isinstance(value, list): @@ -1355,7 +1355,7 @@ def test_parse_clause(): ] assert rlist(dom.parse_clause([('Integer', None, '3..5')])) == [[ ('integer', '>=', 3), - ('integer', '<', 5), + ('integer', '<=', 5), ]] assert rlist(dom.parse_clause([('Reference', None, 'foo')])) == [ ('reference', 'ilike', '%foo%'), diff --git a/tryton/gui/window/view_form/view/screen_container.py b/tryton/gui/window/view_form/view/screen_container.py index 4ce276216a..b07173260f 100644 --- a/tryton/gui/window/view_form/view/screen_container.py +++ b/tryton/gui/window/view_form/view/screen_container.py @@ -36,7 +36,7 @@ class Dates(gtk.HBox): elif from_: return '>=%s' % quote(from_) elif to: - return '<%s' % quote(to) + return '<=%s' % quote(to) class Selection(gtk.ScrolledWindow):