diff --git a/modules/production/CHANGELOG b/modules/production/CHANGELOG index 10b0daf9ee..2171d57063 100644 --- a/modules/production/CHANGELOG +++ b/modules/production/CHANGELOG @@ -1,3 +1,4 @@ +* Allow cancellation of done production * Add code to BOM Version 7.2.0 - 2024-04-29 diff --git a/modules/production/production.py b/modules/production/production.py index fe5e675647..3385c1493b 100644 --- a/modules/production/production.py +++ b/modules/production/production.py @@ -192,6 +192,7 @@ class Production(ShipmentAssignMixin, Workflow, ModelSQL, ModelView): ('waiting', 'cancelled'), ('assigned', 'cancelled'), ('cancelled', 'draft'), + ('done', 'cancelled'), )) cls._buttons.update({ 'cancel': { diff --git a/modules/stock/CHANGELOG b/modules/stock/CHANGELOG index d9e9db8aca..8bdd8910cd 100644 --- a/modules/stock/CHANGELOG +++ b/modules/stock/CHANGELOG @@ -1,3 +1,4 @@ +* Allow cancellation of done shipments * Extend domain to reschedule not yet done shipment * Remove default planned date on supplier shipment * Add shipped state to customer shipment diff --git a/modules/stock/shipment.py b/modules/stock/shipment.py index 37f8ae3b64..677188b218 100644 --- a/modules/stock/shipment.py +++ b/modules/stock/shipment.py @@ -468,6 +468,7 @@ class ShipmentIn( ('draft', 'cancelled'), ('received', 'cancelled'), ('cancelled', 'draft'), + ('done', 'cancelled'), )) cls._buttons.update({ 'cancel': { @@ -880,6 +881,7 @@ class ShipmentInReturn(ShipmentAssignMixin, Workflow, ModelSQL, ModelView): ('waiting', 'cancelled'), ('assigned', 'cancelled'), ('cancelled', 'draft'), + ('done', 'cancelled'), )) cls._buttons.update({ 'cancel': { @@ -1310,6 +1312,7 @@ class ShipmentOut( ('packed', 'cancelled'), ('shipped', 'cancelled'), ('cancelled', 'draft'), + ('done', 'cancelled'), )) cls._buttons.update({ 'cancel': { @@ -2001,6 +2004,7 @@ class ShipmentOutReturn( ('draft', 'cancelled'), ('received', 'cancelled'), ('cancelled', 'draft'), + ('done', 'cancelled'), )) cls._buttons.update({ 'cancel': { @@ -2491,6 +2495,7 @@ class ShipmentInternal( ('waiting', 'cancelled'), ('assigned', 'cancelled'), ('cancelled', 'draft'), + ('done', 'cancelled'), )) cls._buttons.update({ 'cancel': {