Merge lp:~openerp-dev/openobject-client/6.0-bug-851775-ado into lp:openobject-client/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Merged
Merged at revision: 1896
Proposed branch: lp:~openerp-dev/openobject-client/6.0-bug-851775-ado
Merge into: lp:openobject-client/6.0
Diff against target: 12 lines (+1/-1)
1 file modified
bin/widget/view/form_gtk/spinbutton.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client/6.0-bug-851775-ado
Reviewer Review Type Date Requested Status
Raphael Collet (OpenERP) Pending
Review via email: mp+76187@code.launchpad.net

Description of the change

Hello,

"[FIX]: ValueError: u'0.00' does not represent a valid integer value while saving the project issue form"

Steps to reproduce:
 - Install project_issue
 - Create a new issue and close the form
 - Open the issue and try to assign it to an user. Save

GTK client says:

Traceback (most recent call last):
  File "/home/elbati/workspace/openerp/openerp6/client/bin/widget/view/form_gtk/spinbutton.py", line 54, in format_input
    value = user_locale_format.str2int(text)
  File "/home/elbati/workspace/openerp/openerp6/client/bin/tools/user_locale_format.py", line 204, in str2int
    return str2float(string, int)
  File "/home/elbati/workspace/openerp/openerp6/client/bin/tools/user_locale_format.py", line 226, in str2float
    raise ValueError("%r does not represent a valid %s value" % (string,type))
ValueError: u'0.00' does not represent a valid integer value

Thanks,
Amit

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/widget/view/form_gtk/spinbutton.py'
--- bin/widget/view/form_gtk/spinbutton.py 2011-08-18 11:01:28 +0000
+++ bin/widget/view/form_gtk/spinbutton.py 2011-09-20 10:49:23 +0000
@@ -51,7 +51,7 @@
51 def format_input(self, spin, new_value_pointer):51 def format_input(self, spin, new_value_pointer):
52 text = spin.get_text()52 text = spin.get_text()
53 if text:53 if text:
54 value = user_locale_format.str2int(text)54 value = user_locale_format.str2float(text)
55 value_location = ctypes.c_double.from_address(hash(new_value_pointer))55 value_location = ctypes.c_double.from_address(hash(new_value_pointer))
56 value_location.value = float(value)56 value_location.value = float(value)
57 return True57 return True