In order to delete (or archive) an entreprise or an order cycle, we need to be able to delete (or archive) an order. Because we can’t delete an entreprise or order cycle if orders or products or E2E or … are attached to it.
We can only “cancel” an order today, but it stays attached to the order cycle, and distributor, and we can’t delete the shipping method and the distributor. Here is an exemple with Vikabraten Butikk, we created two hubs for the same farmer, to test and now I can’t delete this one.
We are stuck here for the moment, so our database starts to be very much in a mess (for the admins) as we see all the dozens of entreprises en order cycles we have created to make tests, demos, etc. (we only have a production environment in Norway)
I understand it can be dangerous to allow delete entreprise with attached orders, but I guess:
- either then we should be able to “archive” (and the orders attached will be archived as well). In case of mistake or need to go into the history, we can look into the archives.
- either give the choice to the super admin to archive or delete (if it’s a test or demo, better to delete, no sense to archive)
- or depending on if we are in a staging or production environment, in production nothing can be deleted, and in staging you can choose between “delete” and “archive”.
If there are other things attached the system could show them (the orders, E2E, order cycles,etc.) and ask if we want to delete/archive everything. (this should apply not only to orders, but to all elements we want to delete in OFN)
What are your thoughts on that? Anything in the pipeline already?