diff --git a/erpnext/patches.txt b/erpnext/patches.txt index fa62b7fc27..2fa668e84f 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -326,4 +326,5 @@ erpnext.patches.v13_0.agriculture_deprecation_warning erpnext.patches.v14_0.delete_agriculture_doctypes erpnext.patches.v13_0.update_exchange_rate_settings erpnext.patches.v14_0.rearrange_company_fields -erpnext.patches.v14_0.update_leave_notification_template \ No newline at end of file +erpnext.patches.v14_0.update_leave_notification_template +erpnext.patches.v13_0.update_asset_quantity_field \ No newline at end of file diff --git a/erpnext/patches/v13_0/update_asset_quantity_field.py b/erpnext/patches/v13_0/update_asset_quantity_field.py new file mode 100644 index 0000000000..47884d1968 --- /dev/null +++ b/erpnext/patches/v13_0/update_asset_quantity_field.py @@ -0,0 +1,8 @@ +import frappe + + +def execute(): + if frappe.db.count('Asset'): + frappe.reload_doc("assets", "doctype", "Asset") + asset = frappe.qb.DocType('Asset') + frappe.qb.update(asset).set(asset.asset_quantity, 1).run() \ No newline at end of file