From 75eeb010526c035115a5d897bb0ee9e570dad8b4 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 8 May 2013 12:35:33 +0530 Subject: [PATCH] [attachments] [fix] on adding and removing attachments, update the select fields with options attach_files: --- stock/doctype/item/item.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stock/doctype/item/item.js b/stock/doctype/item/item.js index a344ad3ce92..fa42129ce83 100644 --- a/stock/doctype/item/item.js +++ b/stock/doctype/item/item.js @@ -134,11 +134,7 @@ cur_frm.fields_dict.item_supplier_details.grid.get_field("supplier").get_query = erpnext.utils.supplier_query; cur_frm.cscript.on_remove_attachment = function(doc) { - // refresh image list before unsetting image - refresh_field("image"); if(!inList(cur_frm.fields_dict.image.df.options.split("\n"), doc.image)) { - // if the selected image is removed from attachment, unset it - cur_frm.set_value("image", ""); msgprint(wn._("Attachment removed. You may need to update: ") + wn.meta.get_docfield(doc.doctype, "description_html").label); }