From a4b26f7c4ea34ce63cc72ce5a48b9f313b28f6f6 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 15 Feb 2016 19:34:01 +0100 Subject: [PATCH] [FIX] Round unit price --- pos_pricelist/static/src/js/models.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pos_pricelist/static/src/js/models.js b/pos_pricelist/static/src/js/models.js index adc79c3e..5539162c 100644 --- a/pos_pricelist/static/src/js/models.js +++ b/pos_pricelist/static/src/js/models.js @@ -148,7 +148,7 @@ function pos_pricelist_models(instance, module) { db, product, partner, qty ); if (price !== false) { - this.price = price; + this.price = round_di(parseFloat(price) || 0, this.pos.dp['Product Price']); } } }, @@ -179,8 +179,7 @@ function pos_pricelist_models(instance, module) { the unit price of the previous quantity, to preserve manually entered prices as much as possible. */ if (price !== false && price !== old_price) { - this.price = price; - this.trigger('change', this); + this.set_unit_price(price); } }, /**