Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

36 linhas
1.1 KiB

  1. :mod:`form` --- Form Module
  2. ===========================
  3. .. module:: form
  4. :synopsis: Collection of methods that called by the Form widget from the client-side
  5. .. method:: getdoc()
  6. Reads `doctype` and `name` from the incoming request (webnotes.form) and adds a `doclist` to the response
  7. (webnotes.response)
  8. .. method:: getdoctype()
  9. Reads `doctype` from the incoming request and returns a doclist of the DocType
  10. If `with_parent` is set in webnotes.form then, it returns with the first parent doctype incase of a child
  11. type (used in report builder)
  12. .. method:: runserverobj()
  13. runserverobj method called by the `$c` (AJAX Call) function on client side
  14. * reads the incoming doclist
  15. * creates the object using :func:`code.get_server_obj`
  16. * executes the `method` using :func:`code.run_server_obj`
  17. .. method:: savedocs()
  18. Saves the doc and all child records sent by the form when the "Save" button is clicked or `savedocs`
  19. is called from the client side.
  20. Also:
  21. * Checks for integrity - Latest record is being saved
  22. * Validates Links
  23. * Runs `validate`, `on_update`, `on_submit`, `on_cancel`