Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Prevent save document in Python

My app executes PY method on doctype ‘validate’ event.

I want to prevent saving a draft of document in case of some condition.

How I can achive this except frappe.throw() method? I don’t want to show any tracebacks to user, just info message.

Or, maybe, I can hide tracebacks within frappe.throw() window in some way?

Or how I can set validated = false from PY?

frappe.throw(“Your error message”) will not show any trace. Do you see the trace in your case?
Trace is thrown only when an unhandled error occurs. Unless, I’m not seeing something obvious…

Hey, Have you got any solution?

I am looking for the same.