patch: Set against_blanket_order value in existing SO/PO (#19810)

* patch: Set against_blanket_order value in existing SO/PO

* Update set_against_blanket_order_in_sales_and_purchase_order.py
This commit is contained in:
Nabin Hait
2019-12-09 18:27:50 +05:30
committed by GitHub
parent 9e0b3b29fa
commit da4847e46d
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
import frappe
def execute():
for doctype in ['Sales Order Item', 'Purchase Order Item']:
frappe.reload_doctype(doctype)
frappe.db.sql("""
UPDATE `tab{0}`
SET against_blanket_order = 1
WHERE ifnull(blanket_order, '') != ''
""".format(doctype))