diff --git a/purchase_delivery_split_date/models/purchase.py b/purchase_delivery_split_date/models/purchase.py index cd66fb581e9..2069746f861 100644 --- a/purchase_delivery_split_date/models/purchase.py +++ b/purchase_delivery_split_date/models/purchase.py @@ -132,7 +132,7 @@ def _check_split_pickings(self): continue if ( move.picking_id.scheduled_date.date() != date_key - or pickings_by_date[date_key] != move.picking_id + or pickings_by_date.get(date_key, []) != move.picking_id ): if date_key not in pickings_by_date: copy_vals = line._first_picking_copy_vals(key, line)