Skip to content

Commit

Permalink
feat: Ignore company related doctype for other apps via hooks
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a40c04)
  • Loading branch information
deepeshgarg007 authored and mergify[bot] committed Dec 16, 2022
1 parent beaf955 commit cd5a2af
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -204,7 +204,7 @@ def delete_communications(self, doctype, company_fieldname):

@frappe.whitelist()
def get_doctypes_to_be_ignored():
doctypes_to_be_ignored_list = [
doctypes_to_be_ignored = [
"Account",
"Cost Center",
"Warehouse",
Expand All @@ -223,4 +223,7 @@ def get_doctypes_to_be_ignored():
"Customer",
"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

0 comments on commit cd5a2af

Please sign in to comment.