diff --git a/erpnext/patches/v8_1/set_delivery_date_in_so_item.py b/erpnext/patches/v8_1/set_delivery_date_in_so_item.py index 963b82a4dea..aa5cbc50bcc 100644 --- a/erpnext/patches/v8_1/set_delivery_date_in_so_item.py +++ b/erpnext/patches/v8_1/set_delivery_date_in_so_item.py @@ -18,4 +18,6 @@ def execute(): and so.order_type = 'Sales' and (so_item.delivery_date is null or so_item.delivery_date = '' or so_item.delivery_date = '0000-00-00') - """) \ No newline at end of file + and (so.delivery_date is not null and so.delivery_date != '' + and so.delivery_date != '0000-00-00') + """)