mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-14 09:23:09 +00:00
Merge branch 'develop' into hr-separation
This commit is contained in:
@@ -64,4 +64,8 @@ def delete_and_patch_duplicate_bins():
|
||||
bin.update(qty_dict)
|
||||
bin.update_reserved_qty_for_production()
|
||||
bin.update_reserved_qty_for_sub_contracting()
|
||||
if frappe.db.count(
|
||||
"Purchase Order", {"status": ["!=", "Completed"], "is_old_subcontracting_flow": 1}
|
||||
):
|
||||
bin.update_reserved_qty_for_sub_contracting(subcontract_doctype="Purchase Order")
|
||||
bin.db_update()
|
||||
|
||||
@@ -15,6 +15,8 @@ def execute():
|
||||
("accounts", "sales_invoice_item"),
|
||||
("accounts", "purchase_invoice_item"),
|
||||
("buying", "purchase_receipt_item_supplied"),
|
||||
("subcontracting", "subcontracting_receipt_item"),
|
||||
("subcontracting", "subcontracting_receipt_supplied_item"),
|
||||
]
|
||||
|
||||
for module, doctype in doctypes_to_reload:
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
for doctype in ["Purchase Order", "Purchase Receipt", "Purchase Invoice"]:
|
||||
tab = frappe.qb.DocType(doctype).as_("tab")
|
||||
frappe.qb.update(tab).set(tab.is_old_subcontracting_flow, 1).where(
|
||||
tab.is_subcontracted == 1
|
||||
).run()
|
||||
Reference in New Issue
Block a user