Skip to content

Commit

Permalink
Merge pull request #27786 from frappe/mergify/bp/version-13-hotfix/pr…
Browse files Browse the repository at this point in the history
…-27785

fix: Delete linked Transaction Deletion Record docs on deleting company (backport #27785)
  • Loading branch information
deepeshgarg007 authored Oct 5, 2021
2 parents bebd77c + 0c55a98 commit 44ee44d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions erpnext/setup/doctype/company/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ def on_trash(self):
frappe.db.sql("delete from tabEmployee where company=%s", self.name)
frappe.db.sql("delete from tabDepartment where company=%s", self.name)
frappe.db.sql("delete from `tabTax Withholding Account` where company=%s", self.name)
frappe.db.sql("delete from `tabTransaction Deletion Record` where company=%s", self.name)

# delete tax templates
frappe.db.sql("delete from `tabSales Taxes and Charges Template` where company=%s", self.name)
Expand Down

0 comments on commit 44ee44d

Please sign in to comment.