From 4b003afd0ab125b0296de8939626ae889ccdab47 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 27 Nov 2015 16:37:54 +0100 Subject: [PATCH] [FIX] point_of_sale: quantity decimals for new lines In the pos interface, when adding a product to the order, the quantity was set to `1`, but, when adding the same product again, the quantity was set to `2.000`. We use `set_quantity` to not copy/paste what is already done in this method to display correctly the quantity within the product unit of measure rounding. --- addons/point_of_sale/static/src/js/models.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 4a6f57e33b4..7b9b5343306 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -667,8 +667,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal this.order = options.order; this.product = options.product; this.price = options.product.price; - this.quantity = 1; - this.quantityStr = '1'; + this.set_quantity(1); this.discount = 0; this.discountStr = '0'; this.type = 'unit';