[REF] stock: wording when unlinking done move lines
This commit is contained in:
committed by
Simon Lejeune
parent
9ba7f28062
commit
7857770fe1
@@ -249,7 +249,7 @@ class StockMoveLine(models.Model):
|
||||
precision = self.env['decimal.precision'].precision_get('Product Unit of Measure')
|
||||
for ml in self:
|
||||
if ml.state in ('done', 'cancel'):
|
||||
raise UserError(_('You can not delete pack operations of a done picking'))
|
||||
raise UserError(_('You can not delete product moves if the picking is done. You can only correct the done quantities.'))
|
||||
# Unlinking a move line should unreserve.
|
||||
if ml.product_id.type == 'product' and not ml.location_id.should_bypass_reservation() and not float_is_zero(ml.product_qty, precision_digits=precision):
|
||||
self.env['stock.quant']._update_reserved_quantity(ml.product_id, ml.location_id, -ml.product_qty, lot_id=ml.lot_id,
|
||||
|
||||
Reference in New Issue
Block a user