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
1=== modified file 'bin/widget/view/form_gtk/spinbutton.py'
2--- bin/widget/view/form_gtk/spinbutton.py 2011-08-18 11:01:28 +0000
3+++ bin/widget/view/form_gtk/spinbutton.py 2011-09-20 10:49:23 +0000
4@@ -51,7 +51,7 @@
5 def format_input(self, spin, new_value_pointer):
6 text = spin.get_text()
7 if text:
8- value = user_locale_format.str2int(text)
9+ value = user_locale_format.str2float(text)
10 value_location = ctypes.c_double.from_address(hash(new_value_pointer))
11 value_location.value = float(value)
12 return True