brotherton-erpnext/erpnext/patches/v14_0/update_batch_valuation_flag.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
258 B
Python
Raw Normal View History

import frappe
def execute():
"""
- Don't use batchwise valuation for existing batches.
- Only batches created after this patch shoule use it.
"""
2022-02-19 10:56:17 +00:00
batch = frappe.qb.DocType("Batch")
frappe.qb.update(batch).set(batch.use_batchwise_valuation, 0).run()