Skip to content

Commit

Permalink
feat: provide hook point for bulk transaction tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
kittiu committed Sep 7, 2024
1 parent 75cf3e2 commit d4dd01d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions erpnext/utilities/bulk_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ def task(doc_name, from_doctype, to_doctype):
},
"Purchase Receipt": {"Purchase Invoice": purchase_receipt.make_purchase_invoice},
}

hooks = frappe.get_hooks("bulk_transaction_task_mapper")
for hook in hooks:
mapper.update(frappe.get_attr(hook)())

frappe.flags.bulk_transaction = True
if to_doctype in ["Payment Entry"]:
obj = mapper[from_doctype][to_doctype](from_doctype, doc_name)
Expand Down

0 comments on commit d4dd01d

Please sign in to comment.