[FIX] point_of_sale: null value set quantity
Before this fix, when clicking on the delete button from the product screen, when the decrease quantity popup was supposed to be shown, there was a null value issue and thus a traceback. With this fix, we force the value to be 0 instead of null. closes odoo/odoo#92854 Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
.oldPrice {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1309,7 +1309,7 @@ class Orderline extends PosModel {
|
||||
this.order.remove_orderline(this);
|
||||
return true;
|
||||
}else{
|
||||
var quant = typeof(quantity) === 'number' ? quantity : (field_utils.parse.float('' + quantity) || 0);
|
||||
var quant = typeof(quantity) === 'number' ? quantity : (field_utils.parse.float('' + (quantity ? quantity : 0 )));
|
||||
if (this.refunded_orderline_id in this.pos.toRefundLines) {
|
||||
const toRefundDetail = this.pos.toRefundLines[this.refunded_orderline_id];
|
||||
const maxQtyToRefund = toRefundDetail.orderline.qty - toRefundDetail.orderline.refundedQty
|
||||
|
||||
Reference in New Issue
Block a user