Merge pull request #21249 from Thunderbottom/blanket-order-patch-fix

chore: force reload doctype before running patch
This commit is contained in:
Deepesh Garg 2020-04-13 18:59:31 +05:30 committed by GitHub
commit 78c0841d64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,11 @@
import frappe
def execute():
frappe.reload_doc('selling', 'doctype', frappe.scrub('Sales Order Item'))
frappe.reload_doc('buying', 'doctype', frappe.scrub('Purchase Order Item'))
frappe.reload_doc('selling', 'doctype', 'sales_order_item', force=True)
frappe.reload_doc('buying', 'doctype', 'purchase_order_item', force=True)
for doctype in ['Sales Order Item', 'Purchase Order Item']:
for doctype in ('Sales Order Item', 'Purchase Order Item'):
frappe.db.sql("""
UPDATE `tab{0}`
SET against_blanket_order = 1