show message on removing attachment used in description html
This commit is contained in:
parent
49415d90fc
commit
09f799bc98
@ -138,4 +138,15 @@ cur_frm.fields_dict.item_customer_details.grid.get_field("customer_name").get_qu
|
||||
erpnext.utils.customer_query;
|
||||
|
||||
cur_frm.fields_dict.item_supplier_details.grid.get_field("supplier").get_query =
|
||||
erpnext.utils.supplier_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);
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user