[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 <pimodoo@users.noreply.github.com> Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user