refactor: use qb for patching flag

This commit is contained in:
Ankush Menat 2022-02-19 16:26:17 +05:30 committed by Ankush Menat
parent d130233ffc
commit 312db429e4

View File

@ -6,7 +6,6 @@ def execute():
- Don't use batchwise valuation for existing batches. - Don't use batchwise valuation for existing batches.
- Only batches created after this patch shoule use it. - Only batches created after this patch shoule use it.
""" """
frappe.db.sql("""
UPDATE `tabBatch` batch = frappe.qb.DocType("Batch")
SET use_batchwise_valuation=0 frappe.qb.update(batch).set(batch.use_batchwise_valuation, 0).run()
""")