From efc60ec2b5d4019560599ba56ffcf5eb7612347b Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 14 Oct 2021 16:01:08 +0530 Subject: [PATCH 1/3] fix: patch to enable scheduled job for reposting --- erpnext/patches.txt | 1 + .../v13_0/enable_scheduler_job_for_item_reposting.py | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1228b66fbf..bd166928bc 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -305,4 +305,5 @@ erpnext.patches.v13_0.modify_invalid_gain_loss_gl_entries #2 erpnext.patches.v13_0.fix_additional_cost_in_mfg_stock_entry erpnext.patches.v13_0.set_status_in_maintenance_schedule_table erpnext.patches.v13_0.add_default_interview_notification_templates +erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting erpnext.patches.v13_0.requeue_failed_reposts diff --git a/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py b/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py new file mode 100644 index 0000000000..d18bcd7b22 --- /dev/null +++ b/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py @@ -0,0 +1,7 @@ +import frappe + +def execute(): + frappe.reload_doc('core', 'doctype', 'scheduled_job_type') + if frappe.db.exists('Scheduled Job Type', 'repost_item_valuation.repost_entries'): + frappe.db.set_value('Scheduled Job Type', + 'repost_item_valuation.repost_entries', 'stopped', 0) \ No newline at end of file From 3f97413814aca3815273a51b2abca84180806b99 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 14 Oct 2021 16:45:27 +0530 Subject: [PATCH 2/3] chore: formatting --- erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py b/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py index d18bcd7b22..cc10413183 100644 --- a/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py +++ b/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py @@ -1,5 +1,6 @@ import frappe + def execute(): frappe.reload_doc('core', 'doctype', 'scheduled_job_type') if frappe.db.exists('Scheduled Job Type', 'repost_item_valuation.repost_entries'): From 230a5d4b399a127bd6cb33315f410900d1553b9c Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 14 Oct 2021 16:57:54 +0530 Subject: [PATCH 3/3] Update enable_scheduler_job_for_item_reposting.py --- .../patches/v13_0/enable_scheduler_job_for_item_reposting.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py b/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py index cc10413183..e1fae8428f 100644 --- a/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py +++ b/erpnext/patches/v13_0/enable_scheduler_job_for_item_reposting.py @@ -1,8 +1,7 @@ import frappe - def execute(): frappe.reload_doc('core', 'doctype', 'scheduled_job_type') if frappe.db.exists('Scheduled Job Type', 'repost_item_valuation.repost_entries'): frappe.db.set_value('Scheduled Job Type', - 'repost_item_valuation.repost_entries', 'stopped', 0) \ No newline at end of file + 'repost_item_valuation.repost_entries', 'stopped', 0)