diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index 47483c9d1c3..20faded9bbf 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -347,7 +347,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
make_purchase_receipt: function() {
frappe.model.open_mapped_doc({
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
- frm: cur_frm
+ frm: cur_frm,
+ freeze_message: __("Creating Purchase Receipt ...")
})
},
diff --git a/erpnext/stock/doctype/putaway_rule/putaway_rule.py b/erpnext/stock/doctype/putaway_rule/putaway_rule.py
index 53a947f4176..cc58def33a3 100644
--- a/erpnext/stock/doctype/putaway_rule/putaway_rule.py
+++ b/erpnext/stock/doctype/putaway_rule/putaway_rule.py
@@ -42,6 +42,9 @@ class PutawayRule(Document):
frappe.throw(_("Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} qty.")
.format(self.item_code, frappe.bold(balance_qty)), title=_("Insufficient Capacity"))
+ if not self.capacity:
+ frappe.throw(_("Capacity must be greater than 0"), title=_("Invalid"))
+
@frappe.whitelist()
def get_ordered_putaway_rules(item_code, company):
"""Returns an ordered list of putaway rules to apply on an item."""
@@ -137,10 +140,26 @@ def apply_putaway_rule(items, company):
items_not_accomodated.append([item.item_code, pending_qty])
if items_not_accomodated:
- msg = _("The following Items, having Putaway Rules, could not be accomodated:") + "
| {0} | +{1} | + + {2} +