brotherton-erpnext/erpnext/patches/v14_0/update_zero_asset_quantity_field.py
mergify[bot] 99bf63ec0f
fix: set default asset quantity as 1 [dev] (backport #38223) (#38226)
fix: set default asset quantity as 1 [dev] (#38223)

* fix: make default asset quantity as 1

* fix: get rate_of_depreciation from asset category for asset auto-creation

* chore: create asset depr schedules on PR submit, not asset submit

* fix: set default asset quantity as 1

* chore: move patch from v15 to v14

(cherry picked from commit 9903049c7ac7310ca9e3f69c30dc355c2e13bfd5)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
2023-11-20 22:49:38 +05:30

7 lines
160 B
Python

import frappe
def execute():
asset = frappe.qb.DocType("Asset")
frappe.qb.update(asset).set(asset.asset_quantity, 1).where(asset.asset_quantity == 0).run()