From 1704180f38802ba81e9c912455e74d9a0595233e Mon Sep 17 00:00:00 2001 From: Anand Baburajan Date: Fri, 15 Dec 2023 14:43:33 +0530 Subject: [PATCH] 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 --- .../v15_0/create_asset_depreciation_schedules_from_assets.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py index 793497b766eb..ddce997d11cd 100644 --- a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py +++ b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py @@ -3,6 +3,7 @@ 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)