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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
209 B
Python
Raw Normal View History

2022-01-19 12:57:19 +00:00
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()