feat: add employee number to client user bootinfo (#38477) (cherry picked from commit 525f656cc111f6225b44e1211dc5726d311a120b) Co-authored-by: Richard Case <110036763+casesolved-co-uk@users.noreply.github.com>
This commit is contained in:
parent
4b76cc46a1
commit
c7dbcbcd17
@ -637,6 +637,7 @@ additional_timeline_content = {
|
|||||||
|
|
||||||
extend_bootinfo = [
|
extend_bootinfo = [
|
||||||
"erpnext.support.doctype.service_level_agreement.service_level_agreement.add_sla_doctypes",
|
"erpnext.support.doctype.service_level_agreement.service_level_agreement.add_sla_doctypes",
|
||||||
|
"erpnext.startup.boot.bootinfo",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,3 +75,11 @@ def update_page_info(bootinfo):
|
|||||||
"Sales Person Tree": {"title": "Sales Person Tree", "route": "Tree/Sales Person"},
|
"Sales Person Tree": {"title": "Sales Person Tree", "route": "Tree/Sales Person"},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def bootinfo(bootinfo):
|
||||||
|
if bootinfo.get("user") and bootinfo["user"].get("name"):
|
||||||
|
bootinfo["user"]["employee"] = ""
|
||||||
|
employee = frappe.db.get_value("Employee", {"user_id": bootinfo["user"]["name"]}, "name", cache=True)
|
||||||
|
if employee:
|
||||||
|
bootinfo["user"]["employee"] = employee
|
||||||
|
Loading…
x
Reference in New Issue
Block a user