Merge lp:~openerp-dev/openobject-client/6.0-opw-580557-rgo into lp:openobject-client/6.0

Proposed by Ravi Gohil (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: 1962
Merged at revision: 1963
Proposed branch: lp:~openerp-dev/openobject-client/6.0-opw-580557-rgo
Merge into: lp:openobject-client/6.0
Diff against target: 69 lines (+6/-6)
4 files modified
bin/widget/view/form_gtk/spinbutton.py (+1/-1)
bin/widget/view/form_gtk/spinint.py (+1/-1)
bin/widget_search/spinbutton.py (+2/-2)
bin/widget_search/spinint.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client/6.0-opw-580557-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+130352@code.launchpad.net

Description of the change

Hello,

From GTK-Client, when entered value above 2147483647 for integer/float fields, value reverted back to 2147483647. This is due to the limited value supported by sys.maxint, this fix removed this restriction.

Kindly review the fix.

Thanks.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

you forgot to remove the * import sys* which is now useless.
I will be doing while merging.

Thanks,
Naresh

review: Approve

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-10-24 16:20:03 +0000
+++ bin/widget/view/form_gtk/spinbutton.py 2012-10-18 13:34:57 +0000
@@ -29,7 +29,7 @@
29 def __init__(self, window, parent, model, attrs={}):29 def __init__(self, window, parent, model, attrs={}):
30 interface.widget_interface.__init__(self, window, parent, model, attrs)30 interface.widget_interface.__init__(self, window, parent, model, attrs)
3131
32 adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 1.0, 5.0)32 adj = gtk.Adjustment(0.0, -2**100, 2**100, 1.0, 5.0)
33 self.widget = gtk.SpinButton(adj, 1.0, digits=int( attrs.get('digits',(14,2))[1] ) )33 self.widget = gtk.SpinButton(adj, 1.0, digits=int( attrs.get('digits',(14,2))[1] ) )
34 self.widget.set_activates_default(True)34 self.widget.set_activates_default(True)
35 self.widget.connect('populate-popup', self._menu_open)35 self.widget.connect('populate-popup', self._menu_open)
3636
=== modified file 'bin/widget/view/form_gtk/spinint.py'
--- bin/widget/view/form_gtk/spinint.py 2011-10-24 16:22:58 +0000
+++ bin/widget/view/form_gtk/spinint.py 2012-10-18 13:34:57 +0000
@@ -30,7 +30,7 @@
30 def __init__(self, window, parent, model, attrs={}):30 def __init__(self, window, parent, model, attrs={}):
31 interface.widget_interface.__init__(self, window, parent, model, attrs)31 interface.widget_interface.__init__(self, window, parent, model, attrs)
3232
33 adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 1.0, 5.0)33 adj = gtk.Adjustment(0.0, -2**100, 2**100, 1.0, 5.0)
34 self.widget = gtk.SpinButton(adj, 1, digits=0)34 self.widget = gtk.SpinButton(adj, 1, digits=0)
35 self.widget.set_width_chars(5)35 self.widget.set_width_chars(5)
36 self.widget.set_activates_default(True)36 self.widget.set_activates_default(True)
3737
=== modified file 'bin/widget_search/spinbutton.py'
--- bin/widget_search/spinbutton.py 2011-08-18 11:01:28 +0000
+++ bin/widget_search/spinbutton.py 2012-10-18 13:34:57 +0000
@@ -32,7 +32,7 @@
3232
33 self.widget = gtk.HBox(spacing=3)33 self.widget = gtk.HBox(spacing=3)
3434
35 adj1 = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 1.0, 5.0)35 adj1 = gtk.Adjustment(0.0, -2**100, 2**100, 1.0, 5.0)
36 self.spin1 = gtk.SpinButton(adj1, 1.0, digits=int(attrs.get('digits', (14, 2))[1]))36 self.spin1 = gtk.SpinButton(adj1, 1.0, digits=int(attrs.get('digits', (14, 2))[1]))
37 self.spin1.set_activates_default(True)37 self.spin1.set_activates_default(True)
38 self.spin1.connect('input', self.format_input)38 self.spin1.connect('input', self.format_input)
@@ -41,7 +41,7 @@
4141
42 self.widget.pack_start(gtk.Label('-'), expand=False, fill=False)42 self.widget.pack_start(gtk.Label('-'), expand=False, fill=False)
4343
44 adj2 = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 1.0, 5.0)44 adj2 = gtk.Adjustment(0.0, -2**100, 2**100, 1.0, 5.0)
45 self.spin2 = gtk.SpinButton(adj2, 1.0, digits=int(attrs.get('digits', (14, 2))[1]))45 self.spin2 = gtk.SpinButton(adj2, 1.0, digits=int(attrs.get('digits', (14, 2))[1]))
46 self.spin2.set_activates_default(True)46 self.spin2.set_activates_default(True)
47 self.spin2.connect('input', self.format_input)47 self.spin2.connect('input', self.format_input)
4848
=== modified file 'bin/widget_search/spinint.py'
--- bin/widget_search/spinint.py 2011-08-18 11:01:28 +0000
+++ bin/widget_search/spinint.py 2012-10-18 13:34:57 +0000
@@ -35,7 +35,7 @@
3535
36 self.widget = gtk.HBox(spacing=3)36 self.widget = gtk.HBox(spacing=3)
3737
38 adj1 = gtk.Adjustment(0.0, 0.0, sys.maxint, 1.0, 5.0)38 adj1 = gtk.Adjustment(0.0, 0.0, 2**100, 1.0, 5.0)
39 self.spin1 = gtk.SpinButton(adj1, 1, digits=0)39 self.spin1 = gtk.SpinButton(adj1, 1, digits=0)
40 self.spin1.set_activates_default(True)40 self.spin1.set_activates_default(True)
41 self.spin1.connect('input', self.format_input)41 self.spin1.connect('input', self.format_input)
@@ -44,7 +44,7 @@
4444
45 self.widget.pack_start(gtk.Label('-'), expand=False, fill=False)45 self.widget.pack_start(gtk.Label('-'), expand=False, fill=False)
4646
47 adj2 = gtk.Adjustment(0.0, 0.0, sys.maxint, 1.0, 5.0)47 adj2 = gtk.Adjustment(0.0, 0.0, 2**100, 1.0, 5.0)
48 self.spin2 = gtk.SpinButton(adj2, 1, digits=0)48 self.spin2 = gtk.SpinButton(adj2, 1, digits=0)
49 self.spin2.set_activates_default(True)49 self.spin2.set_activates_default(True)
50 self.spin2.connect('input', self.format_input)50 self.spin2.connect('input', self.format_input)