[FIX] point_of_sale: Creating pos order line with qty=0
Steps to reproduce: 1.Create pos order with two products. 2.One of the products, must be type="Stockable Product" and quantity=0. 3.Pay order. 4.Check order --> extra info --> picking Bug: picking state = Waiting Availability In 9.0, the picking state is equal to "Done". Fixes #18089 opw:751565
This commit is contained in:
@@ -628,7 +628,7 @@ class PosOrder(models.Model):
|
||||
return_picking = Picking.create(return_vals)
|
||||
return_picking.message_post(body=message)
|
||||
|
||||
for line in order.lines.filtered(lambda l: l.product_id.type in ['product', 'consu']):
|
||||
for line in order.lines.filtered(lambda l: l.product_id.type in ['product', 'consu'] and not float_is_zero(l.qty, precision_digits=l.product_id.uom_id.rounding)):
|
||||
moves |= Move.create({
|
||||
'name': line.name,
|
||||
'product_uom': line.product_id.uom_id.id,
|
||||
|
||||
Reference in New Issue
Block a user