[IMP] web_decimal_numpad_dot: fixed float widget not working properly

This commit is contained in:
Omar Castiñeira Saavedra
2015-12-15 11:53:05 +01:00
committed by David
parent 04c92b6fed
commit 5a8ff40850

View File

@@ -2,11 +2,13 @@
var instance = openerp; var instance = openerp;
instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({ instance.web.form.FieldFloat = instance.web.form.FieldFloat.extend({
is_field_number: true, render_value: function() {
widget_class: 'oe_form_field_float', var self = this;
events: { this._super();
"keypress": "floatKeypress", if (!this.get('readonly')){
this.$el.find('input').on('keypress', this.floatKeypress.bind(this));
}
}, },
floatKeypress: function(e){ floatKeypress: function(e){
if(e.keyCode == '46' || e.charCode == '46'){ if(e.keyCode == '46' || e.charCode == '46'){