mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Multiple reservations can now be released at once. This fixes issue #50.
This commit is contained in:
@@ -132,8 +132,9 @@ class StockReservation(models.Model):
|
||||
"""
|
||||
Release moves from reservation
|
||||
"""
|
||||
move_recs = self.move_id
|
||||
move_recs.action_cancel()
|
||||
for rec in self:
|
||||
move_recs = rec.move_id
|
||||
move_recs.action_cancel()
|
||||
return True
|
||||
|
||||
@api.model
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
order_line:
|
||||
- product_id: product_gelato
|
||||
product_uom_qty: 4
|
||||
- product_id: product_gelato
|
||||
product_uom_qty: 1
|
||||
-
|
||||
I call the wizard to reserve the products of the sales order
|
||||
-
|
||||
@@ -50,7 +52,7 @@
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
product = self.browse(cr, uid, ref('product_gelato'), context=context)
|
||||
assert product.virtual_available == 6, "Stock is not updated."
|
||||
assert product.virtual_available == 5, "Stock is not updated after reservation."
|
||||
-
|
||||
I release the sales order's reservations
|
||||
-
|
||||
@@ -61,4 +63,4 @@
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
product = self.browse(cr, uid, ref('product_gelato'), context=context)
|
||||
assert product.virtual_available == 10, "Stock is not updated."
|
||||
assert product.virtual_available == 10, "Stock is not updated after releasing reservations."
|
||||
|
||||
Reference in New Issue
Block a user