earthians / marley

Open Source Health Information System
https://frappehealth.com
GNU General Public License v3.0
306 stars 236 forks source link

Root Healthcare Service Unit deleted while clearing company transactions #10

Open rtdany10 opened 2 years ago

rtdany10 commented 2 years ago

HSU Error

Upon running 'Delete all the Transactions for this Company', Healthcare Service Units are also removed, including the root. And it's not possible to add any other units as the root is removed.

But for some weird reasons, I was able to add the root back via Quick Entry after like 3 tries. Another bug, I guess?

Adding doctype to this list will solve the issue. https://github.com/frappe/erpnext/blob/develop/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py#L176-L183

rtdany10 commented 1 year ago

Can be solved by using company_data_to_be_ignored hook. Ref: https://github.com/frappe/erpnext/pull/33362