Skip to main content

RecentDocument

RecentDocument DocType.

Tracks recently viewed documents per user for quick navigation.

Attributes:
user_id: User who viewed the document
doctype: DocType of the viewed document
document_id: ID of the viewed document
document_name: Display name of the document
route: URL route to the document
viewed_at: When the document was last viewed

Source: recent_document.py

Fields

FieldTypeRequiredDescriptionValidators
user_idstrUser who viewed the document-
doctypestrDocType of the viewed document-
document_idstrID of the viewed document-
document_namestrDisplay name of the document-
routestrNoneURL route to the document
viewed_atdatetimeWhen the document was last viewed-

Permissions

RoleCreateDeleteReadWrite
All

Configuration

SettingValue
SubmittableFalse
Track ChangesTrue

Controller

Controller hooks are implemented in *_controller.py files. Available lifecycle hooks:

  • validate() - Called before save, raise exceptions for validation errors
  • before_insert() - Called before inserting a new document
  • after_insert() - Called after successfully inserting
  • before_save() - Called before saving (insert or update)
  • after_save() - Called after saving
  • before_delete() - Called before deleting
  • after_delete() - Called after deleting