Commit 1bd22867 authored by Kevin Deldycke's avatar Kevin Deldycke

Don't format float value, else decimals below second rank will be not display

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7803 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 900d0083
...@@ -823,7 +823,7 @@ class ListBoxWidget(Widget.Widget): ...@@ -823,7 +823,7 @@ class ListBoxWidget(Widget.Widget):
for cname in params.keys(): for cname in params.keys():
if params[cname] != '' and params[cname]!=None: if params[cname] != '' and params[cname]!=None:
kw.setdefault(cname, params[cname]) kw.setdefault(cname, params[cname])
# Try to get the method through acquisition # Try to get the method through acquisition
try: try:
list_method = getattr(here, list_method.method_name) list_method = getattr(here, list_method.method_name)
...@@ -1758,7 +1758,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> ...@@ -1758,7 +1758,7 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
pass pass
else: else:
#attribute_original_value = attribute_value #attribute_original_value = attribute_value
attribute_value = float("%.2f" % attribute_value) attribute_value = float("%f" % attribute_value)
td_align = "right" td_align = "right"
elif isinstance(attribute_value, (int, long)): elif isinstance(attribute_value, (int, long)):
attribute_original_value = attribute_value attribute_original_value = attribute_value
...@@ -2234,8 +2234,8 @@ class ListBox(ZMIField): ...@@ -2234,8 +2234,8 @@ class ListBox(ZMIField):
def get_value(self, id, **kw): def get_value(self, id, **kw):
if (id == 'default'): if (id == 'default'):
if (kw.get('render_format') in ('list', )): if (kw.get('render_format') in ('list', )):
return self.widget.render(self, self.generate_field_key(), None, return self.widget.render(self, self.generate_field_key(), None,
kw.get('REQUEST'), kw.get('REQUEST'),
render_format=kw.get('render_format')) render_format=kw.get('render_format'))
else: else:
return None return None
......
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