Files
schuetz3-erpnext/erpnext/patches/v13_0/enable_uoms.py
Ankush Menat d9f31770c6 fix(patch): enable all uoms on recently created sites
(cherry picked from commit f8119563ca)
2022-01-11 18:56:50 +05:30

14 lines
246 B
Python

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