Merge branch 'develop' into mergify/bp/develop/pr-30385

This commit is contained in:
Deepesh Garg
2022-04-06 10:00:51 +05:30
committed by GitHub
121 changed files with 885 additions and 441 deletions

View File

@@ -0,0 +1,26 @@
# 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", "Supplier Quotation"]:
frappe.db.sql(
"""
UPDATE `tab{doctype}`
SET is_subcontracted = 0
where is_subcontracted in ('', NULL, 'No')""".format(
doctype=doctype
)
)
frappe.db.sql(
"""
UPDATE `tab{doctype}`
SET is_subcontracted = 1
where is_subcontracted = 'Yes'""".format(
doctype=doctype
)
)
frappe.reload_doc(frappe.get_meta(doctype).module, "doctype", frappe.scrub(doctype))