fix: Add hooks for repost allowed doctypes

(cherry picked from commit 919abd2c03)
This commit is contained in:
Deepesh Garg
2024-12-22 20:34:31 +05:30
committed by Mergify
parent a79d2946a1
commit 640c13a5f3

View File

@@ -181,7 +181,7 @@ def start_repost(account_repost_doc=str) -> None:
if not repost_doc.delete_cancelled_entries:
doc.make_gl_entries(1)
doc.make_gl_entries()
else:
elif doc.doctype in frappe.get_hooks("repost_allowed_doctypes"):
if hasattr(doc, "make_gl_entries") and callable(doc.make_gl_entries):
if not repost_doc.delete_cancelled_entries:
if "cancel" in inspect.getfullargspec(doc.make_gl_entries):