[FIX] Unlinking quants fails with non-admin users, avoided. Closes #719

This commit is contained in:
oihane
2015-03-16 11:54:41 +01:00
parent d269f7ac85
commit 00026f3fce

View File

@@ -24,7 +24,7 @@ class StockQuant(models.Model):
if self._get_latest_move(self) == self._get_latest_move(quant):
self.qty += quant.qty
self.cost += quant.cost
quant.unlink()
quant.sudo().unlink()
@api.model
def quants_unreserve(self, move):