From ca8820b5660f371ec9bd05ac6afe104c55168b18 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 7 Oct 2024 23:32:50 +0530 Subject: [PATCH] chore: Allow apps to extend voucher subtypes --- erpnext/controllers/accounts_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 9f2190560c5..56f462a8d6b 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1072,8 +1072,8 @@ class AccountsController(TransactionBase): for method_name in frappe.get_hooks("voucher_subtypes"): voucher_subtype = frappe.get_attr(method_name)(self) - if voucher_subtype: - return voucher_subtype + if voucher_subtype: + return voucher_subtype if self.doctype in voucher_subtypes: return self.get(voucher_subtypes[self.doctype])