You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
600 B
20 lines
600 B
(function() {
|
|
|
|
var instance = openerp;
|
|
|
|
instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({
|
|
is_field_number: true,
|
|
widget_class: 'oe_form_field_float',
|
|
events: {
|
|
"keypress": "floatKeypress",
|
|
},
|
|
floatKeypress: function(e){
|
|
if(e.keyCode == '46' || e.charCode == '46'){
|
|
//Cancel the keypress
|
|
e.preventDefault();
|
|
// Add the comma to the value of the input field
|
|
this.$("input").val(this.$("input").val() + ',');
|
|
}
|
|
},
|
|
});
|
|
})();
|