@@ -206,6 +206,30 @@ def test_picking_fields_view_get(self):
206
206
attrs = safe_eval (attrs_str )
207
207
self .assertIn (("delivery_notification_sent" , "=" , True ), attrs ["invisible" ])
208
208
209
+ def test_send_to_shipper_on_partial_pack (self ):
210
+ """Check if a backorder of a transfer, where the delivery notification is already sent
211
+ keeps the delivery notification sent set.
212
+ """
213
+ with mock .patch .object (
214
+ type (self .carrier_on_pack ),
215
+ "send_shipping" ,
216
+ return_value = SEND_SHIPPING_RETURN_VALUE ,
217
+ ):
218
+ self .shipping .carrier_id = self .carrier_on_pack
219
+ self ._validate_picking (self .picking )
220
+ pack_backorder = self ._validate_picking (self .packing , 5 )
221
+ self .assertTrue (self .shipping .delivery_notification_sent )
222
+ self .assertFalse (pack_backorder .delivery_notification_sent )
223
+ self ._validate_picking (pack_backorder , 5 )
224
+ self .assertTrue (self .shipping .delivery_notification_sent )
225
+ backorder = self ._validate_picking (self .shipping , 5 )
226
+ self .assertEqual (self .shipping .state , "done" )
227
+ self .assertTrue (self .shipping .delivery_notification_sent )
228
+ self .assertTrue (backorder .delivery_notification_sent )
229
+ backorder2 = self ._validate_picking (backorder , 5 )
230
+ self .assertFalse (backorder2 )
231
+ self .assertTrue (backorder .delivery_notification_sent )
232
+
209
233
def test_send_to_shipper_on_pack_partial_shipping (self ):
210
234
"""Check if a backorder of a transfer, where the delivery notification is already sent
211
235
keeps the delivery notification sent set.
0 commit comments