From db938762c77464c2a1cba7a028d5c68cb401df4c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 9 Jul 2015 11:55:30 +0530 Subject: [PATCH] [fix] Adding rows not allowed in Variant table in Manage Variants and Item form --- erpnext/stock/doctype/item/item.json | 6 +++--- erpnext/stock/doctype/manage_variants/manage_variants.js | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index acf2764e936..45606b0d189 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -216,7 +216,7 @@ "options": "Variant Attribute", "permlevel": 0, "precision": "", - "read_only": 0 + "read_only": 1 }, { "fieldname": "inventory", @@ -900,9 +900,9 @@ } ], "icon": "icon-tag", - "idx": 1, + "idx": 1, "max_attachments": 1, - "modified": "2015-07-01 17:20:18.204558", + "modified": "2015-07-09 02:23:47.669199", "modified_by": "Administrator", "module": "Stock", "name": "Item", diff --git a/erpnext/stock/doctype/manage_variants/manage_variants.js b/erpnext/stock/doctype/manage_variants/manage_variants.js index e8b7adefece..edbfcd269ad 100644 --- a/erpnext/stock/doctype/manage_variants/manage_variants.js +++ b/erpnext/stock/doctype/manage_variants/manage_variants.js @@ -42,6 +42,10 @@ frappe.ui.form.on("Manage Variants", { }) }); }, + + onload_post_render: function(frm) { + frm.get_field("variants").grid.cannot_add_rows = true; + }, item_code:function(frm) { return frappe.call({