diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 6a813f2d574..b96af46757c 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1008,6 +1008,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa },this); this.bind_events(); + this.decimal_point = instance.web._t.database.parameters.decimal_point; this.line_delete_handler = function(event){ var node = this; @@ -1026,7 +1027,14 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa node = node.parentNode; } if(node){ - node.line.set_amount(this.value); + var amount; + try{ + amount = instance.web.parse_value(this.value, {type: "float"}); + } + catch(e){ + amount = 0; + } + node.line.set_amount(amount); } }; diff --git a/addons/point_of_sale/static/src/js/widget_base.js b/addons/point_of_sale/static/src/js/widget_base.js index 934cc130a6c..5d1ff78fab2 100644 --- a/addons/point_of_sale/static/src/js/widget_base.js +++ b/addons/point_of_sale/static/src/js/widget_base.js @@ -29,6 +29,7 @@ function openerp_pos_basewidget(instance, module){ //module is instance.point_of if (typeof amount === 'number') { amount = round_di(amount,decimals).toFixed(decimals); + amount = openerp.instances[this.session.name].web.format_value(parseFloat(amount), { type : 'float' }); } if (currency.position === 'after') { diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index c9dd59305ba..0a7ced2cd26 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -873,7 +873,10 @@
- +