fix: move condition for shipment

This commit is contained in:
barredterra
2024-06-20 14:32:01 +02:00
parent 9bad219f0a
commit 21802396ce

View File

@@ -188,8 +188,8 @@ erpnext.stock.DeliveryNoteController = class DeliveryNoteController extends (
); );
} }
if (!doc.is_return && doc.status != "Closed" && frappe.model.can_create("Shipment")) { if (!doc.is_return && doc.status != "Closed") {
if (doc.docstatus == 1) { if (doc.docstatus == 1 && frappe.model.can_create("Shipment")) {
this.frm.add_custom_button( this.frm.add_custom_button(
__("Shipment"), __("Shipment"),
function () { function () {