From a2140b86a23d917996d04da40ba2799a905ea24a Mon Sep 17 00:00:00 2001 From: Maxime Richez Date: Sun, 16 Feb 2025 01:19:46 +0100 Subject: [PATCH] Consider packages as closed also when shipment state is shipped Since 11be7a89b81d customer shipments have a shipped state. Closes #13850 --- modules/stock_package/stock.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/stock_package/stock.py b/modules/stock_package/stock.py index f1bfc4daf1..f8c9eb81ea 100644 --- a/modules/stock_package/stock.py +++ b/modules/stock_package/stock.py @@ -289,7 +289,8 @@ class Package(tree(), MeasurementsMixin, ModelSQL, ModelView): @fields.depends('shipment') def on_change_with_state(self, name=None): if (self.shipment - and self.shipment.state in {'packed', 'done', 'cancelled'}): + and self.shipment.state in { + 'packed', 'shipped', 'done', 'cancelled'}): return 'closed' return 'open'