Submit vs Update in form handler

While perusing code, noticed this issue

frappe-bench/sites/assets/js/form.min.js line 1017

_f.Frm.prototype.action_perm_type_map = {
    "Create": "create",
    "Save": "write",
    "Submit": "submit",
    "Update": "submit",
    "Cancel": "cancel",
    "Amend": "amend",
    "Delete": "delete"
};

Is Update really a synonym for Submit?

Update seems to have separate functions to Submit.

Update after is handled server-side. https://github.com/frappe/frappe/blob/develop/frappe/model/document.py#L555

1 Like