fix: asset patch failure due to missing shift_based column (backport #38776) (#38777)

fix: asset patch failure due to missing shift_based column (#38776)

* fix: add missing daily_prorata_based in get_asset_finance_books_map

* fix: reload Asset Finance Book doctype

(cherry picked from commit 1704180f38802ba81e9c912455e74d9a0595233e)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
This commit is contained in:
mergify[bot] 2023-12-15 14:47:24 +05:30 committed by GitHub
parent 5beea361fe
commit 6e92c78cbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ import frappe
def execute():
frappe.reload_doc("assets", "doctype", "Asset Depreciation Schedule")
frappe.reload_doc("assets", "doctype", "Asset Finance Book")
assets = get_details_of_draft_or_submitted_depreciable_assets()
@ -86,6 +87,7 @@ def get_asset_finance_books_map():
afb.frequency_of_depreciation,
afb.rate_of_depreciation,
afb.expected_value_after_useful_life,
afb.daily_prorata_based,
afb.shift_based,
)
.where(asset.docstatus < 2)