Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

105 wiersze
4.4 KiB

  1. .. _glossary:
  2. Glossary
  3. ========
  4. .. glossary::
  5. DocType
  6. The basic building block of the Web Notes Framework. A DocType represents multiple things
  7. * A table in the database (if `is_single` is `False`)
  8. A table is named as `tab` + the name of the Doctype
  9. Example: The table of doctype Content would be `tabContent`
  10. * A class
  11. * A form
  12. * An agent to perform certain actions
  13. A `DocType` has :term:`Fields`, :term:`Permissions` and :term:`Code`
  14. Single Type
  15. A DocType with property `is_single` as True.
  16. * No table is created for such a DocType
  17. * All field values are stored in the table `tabSingles`
  18. * Mostly used to write Control objects
  19. Document
  20. A single record wrapped by an object-relational mapper.
  21. The document object's properties can be set or accessed using the simple object notation. For example `doc.owner`
  22. doclist
  23. A list of :term:`Document` records representing a single record (along with all its child records). The first
  24. element in the list `doclist[0]` is the main record, the rest, if any, are child records.
  25. Permissions
  26. Role-based permissions are maintained in the DocType. Permissions can also be set on individual fields.
  27. This is done by defining levels. The default level is 0 for all fields.
  28. Permissions can also be set based on certain properties of the user or the role and this is called `match`
  29. If a property is set in `match` column of the permission, then that permission will only apply if
  30. * The user / role has that property (as defined in User Defaults)
  31. * The corresponding DocType has that property
  32. * The value of the property is same, i.e. matches
  33. Example: if the match is on field `department`, then the permission will only apply if the user
  34. is of the same department as the transaction. This can be used to allow group wise access that cannot
  35. be fulfilled by roles.
  36. Page
  37. A Page represpents a simple Page in the application. A page has:
  38. * Static HTML content
  39. * Javascript code, event code
  40. * CSS
  41. Pages can be used to create any type of UI and workflows
  42. Testing Mode
  43. A global flag indicates if the system is in testing mode.
  44. * When the Testing Mode is setup, a copy of all tables is made and stored as `test` + the DocType
  45. * All sql queries are scrubbed so that `tab` + DocType becomes `test` + DocType
  46. * Example: tabContact becomes testContact
  47. The `Testing Mode` is designed to be seamless to the developer and separate series are also mainted for
  48. records created in the testing mode.
  49. Error Console
  50. A Dialog box showing exceptions from the current request. Can be seen by click on Tools -> Error Console
  51. on the :term:`Web Notes Toolbar`
  52. Web Notes Toolbar
  53. A toolbar that is shown by default to the Administrator. To turn this off, set a default property
  54. `hide_webnotes_toolbar` = 1, or set it in the :term:`Control Panel`
  55. Control Panel
  56. A :term:`Single Type` containing global defaults. The can be accessed from the :term:`Web Notes Toolbar` by
  57. going to Options -> Control Panel when logged in as Administrator
  58. Report Builder
  59. This can be accessed from the :term:`Web Notes Toolbar`. The Report Builder provides a way to generate
  60. tabular reports from DocType. You can select the columns of the report as well as filter the report
  61. on columns that have the `in_filter` property set
  62. Search Criteria
  63. Saved settings of the `Report Builder`. This can be used for "one-click" reports. Scripting and other
  64. settings can also be done in the Search Criteria
  65. Locals
  66. A local dictionary (object) in the browser that maintains all records (or metadata) loaded from the server. The format is
  67. locals[`DocType`][`name`]. If an object is loaded in the current session, then it will be present in the
  68. locals object (dictionary)
  69. Standard Query
  70. A standardized way to write a SQL query for the query_builder. This will automatically add conditions
  71. relating to `match` permissions.
  72. For a standard query,
  73. * All SQL keywords must be capitalized
  74. * All columms must be written as `tablename`.`colname`