mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] web_decimal_numpad: extend FieldMonetary (#867)
This commit is contained in:
committed by
Pedro M. Baeza
parent
5e276d803f
commit
5543939b13
@@ -6,7 +6,7 @@ odoo.define("web_decimal_numpad_dot.FieldFloat", function (require) {
|
||||
var basic_fields = require("web.basic_fields");
|
||||
var translation = require("web.translation");
|
||||
|
||||
basic_fields.FieldFloat.include({
|
||||
var NumpadDotReplaceMixin = {
|
||||
init: function () {
|
||||
this.events = $.extend({}, this.events, {
|
||||
"keydown": "numpad_dot_replace",
|
||||
@@ -39,5 +39,12 @@ odoo.define("web_decimal_numpad_dot.FieldFloat", function (require) {
|
||||
to = from + point.length
|
||||
this.$input.prop("selectionStart", to).prop("selectionEnd", to);
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
basic_fields.FieldFloat.include(NumpadDotReplaceMixin);
|
||||
basic_fields.FieldMonetary.include(NumpadDotReplaceMixin);
|
||||
|
||||
return {
|
||||
NumpadDotReplaceMixin: NumpadDotReplaceMixin,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user