OdooWiki OCA HUB
TMS License: AGPL-3

Generic, expiry-tracked document framework for the TMS.

Attach typed documents (license, insurance, inspection, ...) to any TMS resource (drivers, vehicles). Document validity (valid / expiring / expired) is computed from the expiry date against a configurable horizon.

A document can be flagged critical: an expired critical document on a trip's driver or vehicle blocks starting that trip.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Attach expiry-tracked documents (licence, insurance, inspection, other) to drivers and vehicles, see at a glance whether each is valid, expiring or expired, and block starting a trip when a critical document has expired.

This module adds a Documents tab to driver and vehicle forms, plus a Documents menu under the TMS data menu. On a driver or vehicle you can upload one or several files at once; each file becomes a document record where you set the type (Driving License, Insurance, Vehicle Inspection, Other), a reference name, issue date, expiry date, notes and whether it is critical.

Each document automatically shows a status: Valid, Expiring or Expired. Expiring means the expiry date falls within a configurable horizon (30 days by default, stored in the system parameter tms.document.expiry_horizon_days). Documents without an expiry date are always Valid. In the document list, expired lines are shown in red and expiring lines in orange, and you can filter on Expired or Critical.

Business rule: when someone tries to start a trip (tms.order), the system checks the trip's driver and vehicle. If any critical document on them has an expiry date in the past, the trip cannot be started and an error lists the offending documents.

Files are protected: deleting an attachment that belongs to a document is refused, and deleting a document archives it and removes its file. Deleting a driver or vehicle archives its documents instead of losing them. Documents are company-specific, and a dedicated 'Manage TMS Documents' group controls who may create, edit or delete them.

Depends on

Menus it adds

Documents
Models and fields (5)
  • tms.order · extends an existing model
  • tms.driver · extends an existing modeldocument_ids (Documents)
  • tms.document · new modelname (Reference), notes, state, active, res_id (Holder ID), file_id (File), res_ref (Holder), critical, doc_type (Type), res_model (Holder Model), company_id (Company), issue_date, expiry_date
  • fleet.vehicle · extends an existing modeldocument_ids (Documents)
  • ir.attachment · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 19.0

Confirmed on 2026-11-03 in branch 19.0 of OCA/stock-logistics-transport.

terminal Installation and usage

OCA documentation · Odoo 19.0

The expiry horizon is controlled by the configuration parameter tms.document.expiry_horizon_days (default: 30 days).

A document whose expiry date is within this many days is considered expiring; once the expiry date passes, it is expired.

To change the horizon, set the parameter under Settings > Technical > Parameters (or via ir.config_parameter.set_param). A smaller value makes documents switch to expiring later; a larger value warns earlier.

Creating a document

Documents can be created from the Documents menu under TMS > Documents, or directly from a driver or vehicle form using the Documents tab. Click Create and fill in:

  • Document type: e.g. driver license, vehicle insurance, inspection.
  • Number / reference: the reference printed on the document.
  • Holder: the TMS resource the document belongs to (a driver or a vehicle).
  • Expiry date: used to compute the validity state.
  • Critical: mark the document as critical to enforce it on trip start.

When uploading a file from the Documents tab of a holder form, the document is automatically linked to that holder and the file is attached to the holder's chatter.

Once saved, the document appears read-only in the Documents tab of its holder's form, so all documents of a driver or vehicle are visible in one place.

Validity states

The document state is computed from its expiry date and the configured horizon (see Configure):

  • Valid — the expiry date is further away than the horizon.
  • Expiring — the expiry date falls within the horizon.
  • Expired — the expiry date is in the past.

Blocking trip start

When a trip is started, all documents of its driver and vehicle are checked. If any critical document is expired, a user error is raised and the trip cannot be started until the document is renewed, its expiry date is corrected, or it is no longer flagged critical.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.