mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 12:25:09 +00:00
fix: reset User ID and make it read-only if 'Create User Automatically' is set
(cherry picked from commit 2be6bb694f)
This commit is contained in:
@@ -96,6 +96,15 @@ frappe.ui.form.on("Employee", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
create_user_automatically: function (frm) {
|
||||||
|
if (frm.doc.create_user_automatically) {
|
||||||
|
frm.set_value("user_id", "");
|
||||||
|
frm.set_df_property("user_id", "read_only", 1);
|
||||||
|
} else {
|
||||||
|
frm.set_df_property("user_id", "read_only", 0);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
prefered_contact_email: function (frm) {
|
prefered_contact_email: function (frm) {
|
||||||
frm.events.update_contact(frm);
|
frm.events.update_contact(frm);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user