From e6223b04fcc0935cb782f45bbc3f38bfaca3e996 Mon Sep 17 00:00:00 2001 From: Mohamud Amin Ali Date: Wed, 2 Oct 2024 13:34:14 +0300 Subject: [PATCH] refactor: Explicit feedback to timestamp mismatch errror Not necessarily a needed improvement but it adds explicitness to the feedback. fix: text order fix: type --- frappe/model/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/model/document.py b/frappe/model/document.py index 7def467f1c..cc105d77de 100644 --- a/frappe/model/document.py +++ b/frappe/model/document.py @@ -887,7 +887,7 @@ class Document(BaseDocument): if cstr(previous.modified) != cstr(self._original_modified): frappe.msgprint( - _("Error: Document has been modified after you have opened it") + _(f"Error: {self.name} ({self.doctype}) has been modified after you have opened it") + (f" ({previous.modified}, {self.modified}). ") + _("Please refresh to get the latest document."), raise_exception=frappe.TimestampMismatchError,