[PATCH] Upstream patch - 26012023

This commit is contained in:
Parthiv Patel
2023-01-26 08:35:56 +00:00
parent 4760f4c1ae
commit 0ebdc7f430
11 changed files with 218 additions and 4 deletions
+2
View File
@@ -559,6 +559,8 @@ class StockMove(models.Model):
# messages according to the state of the stock.move records.
receipt_moves_to_reassign = self.env['stock.move']
move_to_recompute_state = self.env['stock.move']
if 'quantity_done' in vals and any(move.state == 'cancel' for move in self):
raise UserError(_('You cannot change a cancelled stock move, create a new line instead.'))
if 'product_uom' in vals and any(move.state == 'done' for move in self):
raise UserError(_('You cannot change the UoM for a stock move that has been set to \'Done\'.'))
if 'product_uom_qty' in vals: