[IMP] mrp_subcontracting: cancel subcontract order

A subcontracting receipt cancellation should cancel the
subcontracting order and the associated document.
This commit is contained in:
Arnold Moyaux
2019-08-19 15:03:59 +00:00
parent a3aeabd44d
commit 39c5d0f35e
@@ -32,6 +32,12 @@ class StockPicking(models.Model):
# -------------------------------------------------------------------------
# Action methods
# -------------------------------------------------------------------------
def action_cancel(self):
for picking in self:
picking._get_subcontracted_productions()._action_cancel()
return super(StockPicking, self).action_cancel()
def action_done(self):
# action_done with an extra move will trigger two methods that
# create/modify a subcontracting order, _action_confirm and a write on