Trying to create a new feature for Frappe framework.
When the user is editing a record in a certain doctype and He/She decided to transfer to any other menu and the doctype status is not save
it will warning popup to save or cancel. If he chooses to save it the record is save.
Why we need this?
I let user try ERPNext and one of the problem they found is sometimes they forgot to click save and they have already encoded lots of record and specially a lot of record in a child table (e.g. Sales Order and Sales Order Line) and they transfer to another tab all they encoded is GONE
Maybe other community member has idea the best way to implement this I have already created git issue https://github.com/frappe/frappe/issues/1536
I would like to vote this issue up, this has happened to me in a demo 5 minutes ago.
@max_morais_dmm We have already discuss it with @anand here is what we plan to do as suggested by @anand
I think a better way to handle this is to show Unsaved documents in the List view instead of showing an annoying popup every time. This will also save us from adding that extra configuration option. This might be tricky but would have the right UX.
Before closing a tab, the code should look for any unsaved document and warn the user about it. If the user tries to do a full refresh or close the tab, show pop up that following documents are unsaved. Are you sure you still want to refresh/close?
All opened documents are already saved on the client side in window.locals (better api is frappe.model.get)
@ccfiel, yes I’m following the comments! Thank you so much to share
Is this topic somehow solved?
I just could close a document that was not saved on my V13 playground instance…