mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-21 03:04:34 +00:00
fix: call hooks after gle & sle rename (#48706)
(cherry picked from commit ed79adebc4)
This commit is contained in:
committed by
ruthra kumar
parent
32029f4dca
commit
3d7185fad7
@@ -462,4 +462,9 @@ def rename_temporarily_named_docs(doctype):
|
|||||||
f"UPDATE `tab{doctype}` SET name = %s, to_rename = 0, modified = %s where name = %s",
|
f"UPDATE `tab{doctype}` SET name = %s, to_rename = 0, modified = %s where name = %s",
|
||||||
(newname, now(), oldname),
|
(newname, now(), oldname),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
for hook_type in ("on_gle_rename", "on_sle_rename"):
|
||||||
|
for hook in frappe.get_hooks(hook_type):
|
||||||
|
frappe.call(hook, newname=newname, oldname=oldname)
|
||||||
|
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user