Commit 306c0e45 authored by Jérome Perrin's avatar Jérome Perrin

describe how 'format' parameter is used for queries where type=float


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28661 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8d4ab96f
...@@ -82,6 +82,15 @@ def valueDefaultSearchTextRenderer(value): ...@@ -82,6 +82,15 @@ def valueDefaultSearchTextRenderer(value):
@profiler_decorator @profiler_decorator
def columnFloatRenderer(column, format=None): def columnFloatRenderer(column, format=None):
"""Format a float column.
'format' is a string describing the precision, in which '.' is used as
decimal separator. The number of decimal places in this format string is used
to search with this precision.
For example column=0.12345, format='0.00' will match values equals to 0.12
when truncated to 2 places.
"""
if format is not None: if format is not None:
if '.' in format: if '.' in format:
format = format.replace(' ', '') format = format.replace(' ', '')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment