File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
accounts/doctype/accounts_settings Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 7373 " calculate_depr_using_total_days" ,
7474 " column_break_gjcc" ,
7575 " book_asset_depreciation_entry_automatically" ,
76+ " role_used_for_depreciation_failure" ,
7677 " closing_settings_tab" ,
7778 " period_closing_settings_section" ,
7879 " acc_frozen_upto" ,
658659 "fieldname" : " use_legacy_controller_for_pcv" ,
659660 "fieldtype" : " Check" ,
660661 "label" : " Use Legacy Controller For Period Closing Voucher"
662+ },
663+ {
664+ "description" : " Users with this role will be notified if the asset depreciation gets failed" ,
665+ "fieldname" : " role_used_for_depreciation_failure" ,
666+ "fieldtype" : " Link" ,
667+ "label" : " Role used for Depreciation Failure" ,
668+ "options" : " Role"
661669 }
662670 ],
663671 "grid_page_length" : 50 ,
666674 "index_web_pages_for_search" : 1 ,
667675 "issingle" : 1 ,
668676 "links" : [],
669- "modified" : " 2025-10-20 14:06:08.870427 " ,
677+ "modified" : " 2025-11-24 23:36:21.829372 " ,
670678 "modified_by" : " Administrator" ,
671679 "module" : " Accounts" ,
672680 "name" : " Accounts Settings" ,
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class AccountsSettings(Document):
6565 reconciliation_queue_size : DF .Int
6666 role_allowed_to_over_bill : DF .Link | None
6767 role_to_override_stop_action : DF .Link | None
68+ role_used_for_depreciation_failure : DF .Link | None
6869 round_row_wise_tax : DF .Check
6970 show_balance_in_coa : DF .Check
7071 show_inclusive_tax_in_print : DF .Check
Original file line number Diff line number Diff line change @@ -307,7 +307,8 @@ def set_depr_entry_posting_status_for_failed_assets(failed_asset_names):
307307
308308
309309def notify_depr_entry_posting_error (failed_asset_names , error_log_names ):
310- recipients = get_users_with_role ("Accounts Manager" )
310+ user_role = frappe .db .get_single_value ("Accounts Settings" , "role_used_for_depreciation_failure" )
311+ recipients = get_users_with_role (user_role or "Accounts Manager" )
311312
312313 if not recipients :
313314 recipients = get_users_with_role ("System Manager" )
You can’t perform that action at this time.
0 commit comments