Browse Source

Do not validate links, selects, mandatory, etc. on cancel

version-14
Anand Doshi 11 years ago
parent
commit
0826b97c86
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      frappe/model/document.py

+ 4
- 1
frappe/model/document.py View File

@@ -159,7 +159,10 @@ class Document(BaseDocument):
self.check_if_latest() self.check_if_latest()
self.set_parent_in_children() self.set_parent_in_children()
self.run_before_save_methods() self.run_before_save_methods()
self._validate()

if self._action != "cancel":
self._validate()

if self._action == "update_after_submit": if self._action == "update_after_submit":
self.validate_update_after_submit() self.validate_update_after_submit()




Loading…
Cancel
Save