From 261ccf7c56062930b1d712ae860fe01dd8718968 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 27 Nov 2015 17:22:42 +0100 Subject: [PATCH] [FIX] point_of_sale: quantity uses decimal separator of lang This revision is related to 5a10903e9b3b3f8143a8f8d3703632e3243efead. The above revision makes so the decimal separator from the language is used to display the prices. This revision makes so this decimal separator is used as well for quantities, to be coherent. opw-657591 --- addons/point_of_sale/static/src/js/models.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 7b9b5343306..0bd1b99f94d 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -718,7 +718,8 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal if(unit){ if (unit.rounding) { this.quantity = round_pr(quant, unit.rounding); - this.quantityStr = this.quantity.toFixed(Math.ceil(Math.log(1.0 / unit.rounding) / Math.log(10))); + var decimals = Math.ceil(Math.log(1.0 / unit.rounding) / Math.log(10)); + this.quantityStr = openerp.instances[this.pos.session.name].web.format_value(this.quantity, { type: 'float', digits: [69, decimals]}); } else { this.quantity = round_pr(quant, 1); this.quantityStr = this.quantity.toFixed(0);