2017-07-31 10:50:43 +00:00
|
|
|
# Restrict Purpose Of Stock Entry
|
|
|
|
|
2015-11-05 11:25:10 +00:00
|
|
|
|
|
|
|
frappe.ui.form.on("Material Request", "validate", function(frm) {
|
2017-06-09 11:53:06 +00:00
|
|
|
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 11:25:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{next}
|