Metadata-Version: 2.1
Name: odoo-addon-tms_document
Version: 19.0.1.0.4.5
Requires-Dist: odoo-addon-tms==19.0.*
Requires-Dist: odoo==19.0.*
Summary: Generic expiry-tracked document framework for TMS
Home-page: https://github.com/OCA/stock-logistics-transport
License: AGPL-3
Author: =?utf-8?q?Volkan_Ta=C5=9F=C3=A7=C4=B1=2C_Odoo_Community_Association_=28OCA=29?=
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 19.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Development Status :: 3 - Alpha
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

============
TMS Document
============

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:abfa1029106b9ca468ffbd52b1438eaaeeea6a99bbec0840d72330198675eb09
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
    :target: https://odoo-community.org/page/development-status
    :alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--transport-lightgray.png?logo=github
    :target: https://github.com/OCA/stock-logistics-transport/tree/19.0/tms_document
    :alt: OCA/stock-logistics-transport
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/stock-logistics-transport-19-0/stock-logistics-transport-19-0-tms_document
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-transport&target_branch=19.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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.

.. IMPORTANT::
   This is an alpha version, the data model and design can change at any time without warning.
   Only for development or testing purpose, do not use in production.
   `More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
   :local:

Configuration
=============

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.

Usage
=====

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.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-transport/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/stock-logistics-transport/issues/new?body=module:%20tms_document%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Volkan Taşçı

Contributors
------------

- Volkan Taşçı me@volkantasci.com

Other credits
-------------

- VSL
- Odoo Community Association (OCA)

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-volkantasci| image:: https://github.com/volkantasci.png?size=40px
    :target: https://github.com/volkantasci
    :alt: volkantasci

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-volkantasci| 

This module is part of the `OCA/stock-logistics-transport <https://github.com/OCA/stock-logistics-transport/tree/19.0/tms_document>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
