Override doctype validation

We have been able to override doctype field filters through client scripts, but the validation on save is preventing us from accomplishing desired action.

Is there a way to override a part of doctype field validation on Save/Submit through customization without having to create an app?

ERPnext ver 13

Try writing a server script on On Save event to override the validation.

can you give more details?

The Serial No structure existing in ERPnext is of use to us. Not sure what the business logic was to restrict it to stock items. We drop ship items that have Serial Numbers. Was able to use Client Script to eliminate filters on form field entry, but the form validation on save for:

  • Item doctype: cannot have “has serial no” checked if maintain stock is not
  • Serial No doctype: checks that item code has “maintain stock” and “has serial no” checked
    Eliminating Serial No validation should be sufficient as then state of Item check marks does not matter. To avoid errors would be nice to only show items with has serial no checked on serial no form, but not necessary

We are not programmers. Can do javascript following examples, but do not know python. The “override class” using hooks and custom app is non-trivial for us. Being able to use server script front end functionality to simply redefine an existing method would be great, but not sure if possible. If possible, not sure how to do.