fix(patch): enable all uoms on recently created sites
(cherry picked from commit f8119563ca)
This commit is contained in:
committed by
Ankush Menat
parent
c1fbd2308c
commit
d9f31770c6
@@ -331,6 +331,7 @@ erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting
|
||||
erpnext.patches.v13_0.requeue_failed_reposts
|
||||
erpnext.patches.v13_0.fetch_thumbnail_in_website_items
|
||||
erpnext.patches.v13_0.update_job_card_status
|
||||
erpnext.patches.v13_0.enable_uoms
|
||||
erpnext.patches.v12_0.update_production_plan_status
|
||||
erpnext.patches.v13_0.item_naming_series_not_mandatory
|
||||
erpnext.patches.v13_0.update_category_in_ltds_certificate
|
||||
|
||||
13
erpnext/patches/v13_0/enable_uoms.py
Normal file
13
erpnext/patches/v13_0/enable_uoms.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user