Consider packages as closed also when shipment state is shipped

Since 11be7a89b81d customer shipments have a shipped state.

Closes #13850
This commit is contained in:
Maxime Richez
2025-02-16 01:19:46 +01:00
parent 18bae90225
commit a2140b86a2
+2 -1
View File
@@ -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'