diff options
| author | Arnold Moyaux <arm@odoo.com> | 2019-08-14 14:14:16 +0000 |
|---|---|---|
| committer | Arnold Moyaux <arm@odoo.com> | 2019-08-19 15:03:59 +0000 |
| commit | 39c5d0f35efbfbd43fbcc8e8ad48a9477b8fd77c (patch) | |
| tree | d0e699777b5adc545ceb52c0598b05d8b243d866 /addons/mrp_subcontracting/models | |
| parent | a3aeabd44d36dd735d4bfd78c65fc8f850578c60 (diff) | |
[IMP] mrp_subcontracting: cancel subcontract order
A subcontracting receipt cancellation should cancel the
subcontracting order and the associated document.
Diffstat (limited to 'addons/mrp_subcontracting/models')
| -rw-r--r-- | addons/mrp_subcontracting/models/stock_picking.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/mrp_subcontracting/models/stock_picking.py b/addons/mrp_subcontracting/models/stock_picking.py index cd310f5ea3f..00a6fbbd11a 100644 --- a/addons/mrp_subcontracting/models/stock_picking.py +++ b/addons/mrp_subcontracting/models/stock_picking.py @@ -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 |
