brotherton-erpnext/erpnext/patches/v13_0/enable_uoms.py

14 lines
246 B
Python
Raw Normal View History

import frappe
def execute():
2022-03-28 13:22:46 +00:00
frappe.reload_doc("setup", "doctype", "uom")
uom = frappe.qb.DocType("UOM")
2022-03-28 13:22:46 +00:00
(
frappe.qb.update(uom)
.set(uom.enabled, 1)
.where(uom.creation >= "2021-10-18") # date when this field was released
).run()