Skip to content

Commit

Permalink
fix: improve error message
Browse files Browse the repository at this point in the history
Co-authored-by: Raffael Meyer <[email protected]>
  • Loading branch information
blaggacao and barredterra committed Mar 12, 2024
1 parent 3d67c17 commit a377e8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/stock/doctype/delivery_trip/delivery_trip.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ def validate_delivery_note_not_draft(self):
)
draft_delivery_notes = frappe.get_all(
"Delivery Note",
{"status": "Draft", "name": ["in", delivery_notes]},
{"docstatus": 0, "name": ["in", delivery_notes]},
pluck="name",
)
if draft_delivery_notes:
frappe.throw(
_(
"Delivery Notes may not be in Draft to submit. The following Delivery Notes are in draft {0}"
"Delivery Notes should not be in draft state when submitting a Delivery Trip. The following Delivery Notes are still in draft state: {0}. Please submit them first."
).format(", ".join(draft_delivery_notes))
)

Expand Down

0 comments on commit a377e8a

Please sign in to comment.