mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 00:55:02 +00:00
fix: patch to update job card status
(cherry picked from commit ccf84ae88a)
This commit is contained in:
committed by
Ankush Menat
parent
f2aa5015cb
commit
b45d9065da
@@ -329,6 +329,7 @@ erpnext.patches.v13_0.trim_sales_invoice_custom_field_length
|
||||
erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting
|
||||
erpnext.patches.v13_0.requeue_failed_reposts
|
||||
erpnext.patches.v13_0.fetch_thumbnail_in_website_items
|
||||
erpnext.patches.v13_0.update_job_card_status
|
||||
erpnext.patches.v12_0.update_production_plan_status
|
||||
erpnext.patches.v13_0.update_category_in_ltds_certificate
|
||||
erpnext.patches.v13_0.create_ksa_vat_custom_fields
|
||||
|
||||
18
erpnext/patches/v13_0/update_job_card_status.py
Normal file
18
erpnext/patches/v13_0/update_job_card_status.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2021, Frappe and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
|
||||
job_card = frappe.qb.DocType("Job Card")
|
||||
(frappe.qb
|
||||
.update(job_card)
|
||||
.set(job_card.status, "Completed")
|
||||
.where(
|
||||
(job_card.docstatus == 1)
|
||||
& (job_card.for_quantity <= job_card.total_completed_qty)
|
||||
& (job_card.status.isin(["Work In Progress", "Material Transferred"]))
|
||||
)
|
||||
).run()
|
||||
Reference in New Issue
Block a user