From 348ea5c5bb42fb9dcd592c011783ffd6cd989808 Mon Sep 17 00:00:00 2001 From: Maxime Richez Date: Fri, 20 Sep 2024 14:58:46 +0200 Subject: [PATCH] Extend domain to reschedule not yet done shipment Closes #13536 --- modules/stock/CHANGELOG | 1 + modules/stock/shipment.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/stock/CHANGELOG b/modules/stock/CHANGELOG index 8886c1cc9b..d9e9db8aca 100644 --- a/modules/stock/CHANGELOG +++ b/modules/stock/CHANGELOG @@ -1,3 +1,4 @@ +* 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 c96a96e7ac..37f8ae3b64 100644 --- a/modules/stock/shipment.py +++ b/modules/stock/shipment.py @@ -1114,7 +1114,7 @@ class ShipmentInReturn(ShipmentAssignMixin, Workflow, ModelSQL, ModelView): @classmethod def _get_reschedule_domain(cls, date): return [ - ('state', '=', 'waiting'), + ('state', 'in', ['waiting', 'assigned']), ('planned_date', '<', date), ] @@ -1840,7 +1840,7 @@ class ShipmentOut( @classmethod def _get_reschedule_domain(cls, date): return [ - ('state', '=', 'waiting'), + ('state', 'in', ['waiting', 'assigned', 'picked', 'packed']), ('planned_date', '<', date), ] @@ -2985,7 +2985,7 @@ class ShipmentInternal( @classmethod def _get_reschedule_domain(cls, date): return [ - ('state', '=', 'waiting'), + ('state', 'in', ['waiting', 'assigned']), ('planned_date', '<', date), ]