Repository
OCA/stock-logistics-transport · module folder · Try on Runboat
Module version
1.0.4
Category
TMS
Folder size
0.09 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/stock-logistics-transport
Last tracking update
2026-08-27 05:25:14
Authors
Odoo Community Association (OCA), Volkan Taşçı
Maintainers
Odoo Community Association (OCA), Volkan Taşçı
Committers
OCA-git-bot, oca-ci, Volkan TAŞCI
Odoo dependencies
OCA/stock-logistics-transport:
- tms
odoo/odoo:
- uom
- web
- bus
Python dependencies
None
System dependencies
None
Required by
None
Description
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.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
view_fleet_vehicle_documents fleet.vehicle.documents fleet.vehicle form Inherits tms.fleet_vehicle_inherit_view_form
view_tms_document_form tms.document.form tms.document form New
view_tms_document_list tms.document.list tms.document list New
view_tms_document_search tms.document.search tms.document search New
view_tms_driver_documents tms.driver.documents tms.driver form Inherits tms.view_tms_driver_form_inherit
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (5)

New fields (1)
  • document_ids One2many → tms.document
    compute='_compute_document_ids' inverse='_inverse_document_ids' readonly=False string='Documents' args: 'tms.document', 'res_id'
Public methods (1)
  • unlink(self)

New fields (0)

No new fields.

Public methods (1)
  • unlink(self)

New fields (13)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> required=True string='Company' args: 'res.company'
  • critical Boolean
    default=False help='If checked, an expired document blocks trip start on its holder. Documents without an expiry date are never considered expired.' tracking=True
  • doc_type Selection
    required=True selection='_selection_doc_type' string='Type' tracking=True
  • expiry_date Date
    index=True tracking=True
  • file_id Many2one → ir.attachment
    ondelete='set null' string='File' args: 'ir.attachment'
  • issue_date Date
    tracking=True
  • name Char
    required=True string='Reference' tracking=True
  • notes Text
    tracking=True
  • res_id Integer
    index=True required=True string='Holder ID'
  • res_model Char
    index=True required=True string='Holder Model'
  • res_ref Reference
    compute='_compute_res_ref' inverse='_inverse_res_ref' selection='_selection_res_model' string='Holder'
  • state Selection
    compute='_compute_state' store=False args: [('valid', 'Valid'), ('expiring', 'Expiring'), ('expired', 'Expired')]
Public methods (4)
  • action_replace_file(self, attachment_id)
  • action_soft_delete(self)
  • create_document_from_attachment(self, attachment_ids)
    @api.model
    Create documents from the given attachments for the holder found in the context (``default_res_model`` / ``default_res_id``).
  • unlink(self)

New fields (1)
  • document_ids One2many → tms.document
    compute='_compute_document_ids' inverse='_inverse_document_ids' readonly=False string='Documents' args: 'tms.document', 'res_id'
Public methods (1)
  • unlink(self)

New fields (0)

No new fields.

Public methods (1)
  • button_start_order(self)