[MOD] Second step, quants merged when unreserving stock.move

This commit is contained in:
oihane
2015-03-02 17:34:29 +01:00
parent aeeff89d92
commit c3eb7f2a0f

View File

@@ -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()