From 32056eaf4a8a8f311aca2923bfe6133985cba7fb Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Mon, 10 Aug 2020 09:34:38 +0000 Subject: [PATCH] [FIX] l10n_fr_pos_cert: avoid losing price when canceling item In a French based company Create a DEMO product with price 500 available in POS Have a public pricelist in which feature a line with: - product: DEMO - minimum quantity: 1 - price: 400 Open POS, Add DEMO, the price from the pricelist will be used (400). Now delete the product. The form will popup, choose a quantity to delete and confirm. The price of the cancel line will not be taken from the pricelist, so the two line will have different prices. This occur because the quantity of the new line is -1 and the pricelist may have a minimum positive quantity set. Using a specific option to keep the price fix the issue opw-2312172 closes odoo/odoo#55824 X-original-commit: 1ff8281c4f43525dc24059bd1ff4e63bc47ecffd Signed-off-by: pimodoo Signed-off-by: Jorge Pinna Puissant (jpp) --- .../static/src/js/Screens/ProductScreen/ProductScreen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js b/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js index 2f966c48c3d..70c58bd5b86 100644 --- a/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js +++ b/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js @@ -259,7 +259,7 @@ odoo.define('point_of_sale.ProductScreen', function(require) { let decreasedQuantity = currentQuantity - newQuantity newLine.order = order; - newLine.set_quantity( - decreasedQuantity); + newLine.set_quantity( - decreasedQuantity, true); order.add_orderline(newLine); } }