spinbutton scroll changes prices and quantities

Bug #575616 reported by Frédéric (Ferme du Sart)
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fix Committed

Bug Description

Scrolling on GTK/QT spinbuttons changes value. But it's too much dangerous to change prices and quantities on the fly. Even if we confirm changes on popup, we may not have seen all changes we confirm.

As far as I know, we can't disable scrolling on spinbuttons, but we can set step increment to 0 instead of one.

I propose to change those lines:
./widget/view/form_gtk/spinbutton.py: adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 1.0, 5.0)
./widget/view/form_gtk/spinint.py: adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 1.0, 5.0)
./widget/view/form_gtk/spinbutton.py: adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 0.0, 5.0)
./widget/view/form_gtk/spinint.py: adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 0.0, 5.0)

Thanks for applying changes or returning a feed-back.

Related branches

security vulnerability: yes → no
visibility: private → public
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hello Frédéric,

Thank you for the proposed patch, however it looks like this would disable the mousewheel as well as the up/down buttons on all integer/float fields, which could be quite annoying and make them harder to use.

I suppose it makes sense to use a locally patched client if your users tend to use the mousewheel when focused on int/float fields.
Maybe for the future we could think of a way to selectively turn this feature on/off. Alternatively you could consider switching the sensitive fields to a different widget, if you only have a few.

I hope you understand our point of view...

Changed in openobject-client:
status: New → Opinion
Revision history for this message
Numérigraphe (numerigraphe) wrote :

I'm reopening this bug because I get a lot of complaints about this.
I propose to add a configuration key to set the spin buttons' increment.
Setting it to 0 in the configuration file disables spinning altogether.
The default remains to increment/decrement by 1.0 on spin.

Changed in openobject-client:
status: Opinion → Fix Committed
assignee: nobody → Numérigraphe (numerigraphe)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers