Skip to content
Snippets Groups Projects
Commit ac6e2d75 authored by Simon Lejeune's avatar Simon Lejeune
Browse files

[FIX] mrp: do not blindly override stock.move's _action_cancel

parent 6728fe6a
Branches
Tags
No related merge requests found
......@@ -83,7 +83,7 @@ class StockMove(models.Model):
return res
def _action_cancel(self):
if any(move.quantity_done for move in self): #TODO: either put in stock, or check there is a production order related to it
if any(move.quantity_done and (move.raw_material_production_id or move.production_id) for move in self):
raise exceptions.UserError(_('You cannot cancel a manufacturing order if you have already consumed material.\
If you want to cancel this MO, please change the consumed quantities to 0.'))
return super(StockMove, self)._action_cancel()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment