diff --git a/stock/doctype/stock_entry/stock_entry.js b/stock/doctype/stock_entry/stock_entry.js index c54f619735..3e21207eaa 100644 --- a/stock/doctype/stock_entry/stock_entry.js +++ b/stock/doctype/stock_entry/stock_entry.js @@ -360,7 +360,8 @@ cur_frm.cscript.uom = function(doc, cdt, cdn) { cur_frm.cscript.validate = function(doc, cdt, cdn) { cur_frm.cscript.validate_items(doc); - validated = cur_frm.cscript.get_doctype_docname() ? true : false; + if($.inArray(cur_frm.doc.purpose, ["Purchase Return", "Sales Return"])!==-1) + validated = cur_frm.cscript.get_doctype_docname() ? true : false; } cur_frm.cscript.validate_items = function(doc) {