From a9d3981c86c58f7763b33ccb9b0f6d66b27c4aac Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 7 Jul 2016 11:34:34 +0530 Subject: [PATCH] [fix] Condition for visibility of 'Get Items from Open Material Requests' in PO --- erpnext/buying/doctype/purchase_order/purchase_order.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index c99481eb98..923a3edf9b 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -120,7 +120,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "depends_on": "eval:doc.supplier && doc.docstatus===0 && !(doc.items && doc.items.length)", + "depends_on": "eval:doc.supplier && doc.docstatus===0 && (!(doc.items && doc.items.length) || (doc.items.length==1 && !doc.items[0].item_code))", "fieldname": "get_items_from_open_material_requests", "fieldtype": "Button", "hidden": 0, @@ -2689,13 +2689,14 @@ "hide_toolbar": 0, "icon": "icon-file-text", "idx": 105, + "image_view": 0, "in_create": 0, "in_dialog": 0, "is_submittable": 1, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-05-23 15:20:59.954292", + "modified": "2016-07-07 11:32:05.248626", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order",