Merge pull request #45914 from rohitwaghchaure/fixed-reposting-issue

fix: start reposting button not working
This commit is contained in:
rohitwaghchaure
2025-02-14 21:28:20 +05:30
committed by GitHub

View File

@@ -481,4 +481,9 @@ def in_configured_timeslot(repost_settings=None, current_time=None):
@frappe.whitelist()
def execute_repost_item_valuation():
"""Execute repost item valuation via scheduler."""
frappe.get_doc("Scheduled Job Type", "repost_item_valuation.repost_entries").enqueue(force=True)
if name := frappe.db.get_value(
"Scheduled Job Type",
{"method": "erpnext.stock.doctype.repost_item_valuation.repost_item_valuation.repost_entries"},
"name",
):
frappe.get_doc("Scheduled Job Type", name).enqueue(force=True)