Merge pull request #33362 from deepeshgarg007/exclude_gst_credential_doctype

feat: Ignore company related doctype for other apps via hooks
This commit is contained in:
Deepesh Garg 2022-12-16 11:07:47 +05:30 committed by GitHub
commit 5c50a46822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,7 +204,7 @@ class TransactionDeletionRecord(Document):
@frappe.whitelist() @frappe.whitelist()
def get_doctypes_to_be_ignored(): def get_doctypes_to_be_ignored():
doctypes_to_be_ignored_list = [ doctypes_to_be_ignored = [
"Account", "Account",
"Cost Center", "Cost Center",
"Warehouse", "Warehouse",
@ -223,4 +223,7 @@ def get_doctypes_to_be_ignored():
"Customer", "Customer",
"Supplier", "Supplier",
] ]
return doctypes_to_be_ignored_list
doctypes_to_be_ignored.extend(frappe.get_hooks("company_data_to_be_ignored") or [])
return doctypes_to_be_ignored