mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MOD] Second step, quants merged when unreserving stock.move
This commit is contained in:
@@ -27,3 +27,10 @@ class StockQuant(models.Model):
|
||||
quant.unlink()
|
||||
self.cost += cost
|
||||
self.qty += qty
|
||||
|
||||
@api.model
|
||||
def quants_unreserve(self, move):
|
||||
related_quants = [x for x in move.reserved_quant_ids]
|
||||
super(StockQuant, self).quants_unreserve(move)
|
||||
for quant in related_quants:
|
||||
quant.merge_stock_quants()
|
||||
|
||||
Reference in New Issue
Block a user