2017-07-31 16:20:43 +05:30
|
|
|
# Restrict Purpose Of Stock Entry
|
|
|
|
|
2015-11-05 16:55:10 +05:30
|
|
|
|
|
|
|
frappe.ui.form.on("Material Request", "validate", function(frm) {
|
2017-06-09 17:23:06 +05:30
|
|
|
if(frappe.user=="user1@example.com" && frm.doc.purpose!="Material Receipt") {
|
|
|
|
frappe.msgprint("You are only allowed Material Receipt");
|
|
|
|
frappe.throw(__("Not allowed"));
|
2015-11-05 16:55:10 +05:30
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{next}
|