Repository
OCA/rest-framework · module folder · Try on Runboat
Module version
1.0.1
Category
Uncategorized
Folder size
0.09 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/rest-framework
Last tracking update
2026-08-07 09:06:24
Authors
Camptocamp, Odoo Community Association (OCA), ACSONE
Maintainers
Camptocamp, Odoo Community Association (OCA), ACSONE
Committers
Stéphane Bidoul
Odoo dependencies
OCA/connector:
OCA/rest-framework:
odoo/odoo:
- web
Python dependencies
apispec, cerberus, parse-accept-language, pyquerystring, cachetools
System dependencies
None
Required by
None
Description
When exposing REST services is often useful to see what's happening
especially in case of errors.

This module add DB logging for REST requests. It also inject in the
response the URL of the log entry created.

NOTE: this feature was implemented initially inside shopfloor app. Up to
version 13.0.1.2.1 of this module, if shopfloor is installed, log
records will be copied from its table.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
rest_log_form_view rest.log form rest.log form New
rest_log_search_view rest.log search rest.log search New
rest_log_tree_view rest.log tree rest.log list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (1)

New fields (12)
  • collection Char
    index=True
  • collection_id Integer
    index=True string='Collection ID'
  • error Text
    readonly=True
  • exception_message Text
    readonly=True
  • exception_name Char
    readonly=True string='Exception'
  • headers Text
    readonly=True
  • params Text
    readonly=True
  • request_method Char
    readonly=True
  • request_url Char
    readonly=True string='Request URL'
  • result Text
    readonly=True
  • severity Selection
    compute='_compute_severity' readonly=False selection=[('functional', 'Functional'), ('warning', 'Warning'), ('severe', 'Severe')] store=True
  • state Selection
    readonly=True selection=[('success', 'Success'), ('failed', 'Failed')]
Public methods (3)
  • action_view_collection(self)
    Open collection if we have a real record. NOTE: use an action instead of a `Reference` field with computed method because it would force use to have glue modules to provide a selection for every model we want to support.
  • autovacuum(self)
    Delete logs which have exceeded their retention duration Called from a cron.
  • logging_active(self)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…