Commit Graph

1 Commits

Author SHA1 Message Date
Ali 31d93fb887 feat(bank-statement-importer): cascade delete with confirmation
Stock delete on Bank Statement Importer hits Frappe's link-check
(registry rows + Bank Account dynamic-link) and refuses to proceed,
leaving users unable to remove an importer they no longer need without
hand-cleaning every dependent row.

New flow:
- cascade_delete.py adds two whitelisted endpoints: get_dependents
  (counts) and cascade_delete (unlink Bank Accounts → delete Customer/
  Supplier/Purpose registry rows → delete the importer)
- bank_statement_importer.js overrides the Menu → Delete action: shows
  a confirm dialog listing exactly how many records will be deleted vs
  just unlinked, with a red primary button to drive the choice home.
  After success the user is sent to the list view.

Bank Accounts are intentionally unlinked rather than deleted — they hold
business data (Bank Transactions, reconciliations) that has nothing to
do with the importer being removed.
2026-05-18 13:50:03 +00:00