From 247e9ffc960f159b2f018afd4ff1f8ae36607c57 Mon Sep 17 00:00:00 2001 From: nathando Date: Wed, 3 Sep 2014 15:03:31 +0800 Subject: [PATCH] get_item_list does not [item qty=0] - By using `if not d.qty:` it totally limits the chance of creating an empty Delivery Note - Should be changed to `if d.qty is None` Use case for empty DN: - Open a Delivery Note and tight to a specific Sales Order first without knowing the real qty at this point. - Using barcode scanner to receive Sales Order to this DN (multiple times). --- erpnext/controllers/selling_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index e758dd1a707..86d883784ba 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -339,7 +339,7 @@ class SellingController(StockController): reserved_warehouse = "" reserved_qty_for_main_item = 0 - if not d.qty: + if d.qty is None: frappe.throw(_("Row {0}: Qty is mandatory").format(d.idx)) if self.doctype == "Sales Order":