Skip to content

Commit

Permalink
fix(patch): enable all uoms on recently created sites
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Jan 11, 2022
1 parent 33aad4b commit f811956
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions erpnext/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ erpnext.patches.v13_0.add_default_interview_notification_templates
erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting
erpnext.patches.v13_0.requeue_failed_reposts
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.healthcare_deprecation_warning
erpnext.patches.v13_0.item_naming_series_not_mandatory
Expand Down
13 changes: 13 additions & 0 deletions erpnext/patches/v13_0/enable_uoms.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit f811956

Please sign in to comment.