Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] tms #130

Merged
merged 17 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.19
_commit: v1.21.1
_src_path: gh:oca/oca-addons-repo-template
additional_ruff_rules: []
ci: GitHub
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Stale PRs and issues policy
uses: actions/stale@v4
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# General settings.
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
# * Issues that are pending more information
# * Except Issues marked as "no stale"
- name: Needs more information stale issues policy
uses: actions/stale@v4
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ascending: true
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ jobs:
run: oca_init_test_database
- name: Run tests
run: oca_run_tests
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Update .pot files
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ exclude: |
readme/.*\.(rst|md)$|
# Ignore build and dist directories in addons
/build/|/dist/|
# Ignore test files in addons
/tests/samples/.*|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
Expand All @@ -41,7 +43,7 @@ repos:
hooks:
- id: whool-init
- repo: https://github.com/oca/maintainer-tools
rev: f71041f22b8cd68cf7c77b73a14ca8d8cd190a60
rev: 9a170331575a265c092ee6b24b845ec508e8ef75
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
Expand Down Expand Up @@ -110,7 +112,7 @@ repos:
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/OCA/pylint-odoo
rev: v8.0.19
rev: v9.0.4
hooks:
- id: pylint_odoo
name: pylint with optional checks
Expand Down
1 change: 1 addition & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ fix = true
extend-select = [
"B",
"C90",
"E501", # line too long (default 88)
"I", # isort
"UP", # pyupgrade
]
Expand Down
227 changes: 227 additions & 0 deletions tms/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
=========
Transport
=========

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

.. |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/licence-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/17.0/tms
: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-17-0/stock-logistics-transport-17-0-tms
: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=17.0
:alt: Try me on Runboat

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

The Transport Management Systems (TMS) module manages the workflow of
creating transport operations within Odoo. This module provides features
such as creating teams, stages, crews, routes, and vehicles, allowing
businesses to efficiently handle various aspects of their transport
operations.

.. 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
=============

TMS module can be used with advanced configuration that enable extra
features complementing the base module.

Units of Measure
----------------

In the base module units of measure (UoM) aren't considered. They have
to be manually enabled in the settings.

1. Go to TMS > Configuration > Settings > Units
2. Activate the "Units of measure" checkbox and save the changes
3. Now UoM appear in the module in the distance, length, weight and time
fields with a default unit that is computed.
4. To change the default UoM of an specific magnitude, select the
default UoM in its corresponding measurement in the settings.

Manage teams and crews
----------------------

Team management is an advanced feature that can be configured in the TMS
module. They are a predefined group of employees that have predefined
drivers and vehicles. "Mexican Transportation Company", i.e., has the
"Mexico City Team" and "Querétaro Team" with their own vehicles and
drivers.

1. Go to TMS > Configuration > Settings > Drivers
2. Activate the "Manage Teams" checkbox and save the changes
3. Go to TMS > Configuration > Drivers > Teams
4. A default team is created. Edit this team or create a new one
5. Write the team's name, select the drivers and the vehicles
6. If it's configured, you can also select crews for this team
7. When a trip is created, you can assign the trip to an specific team.

Crew management is an advanced feature that can be configured in the TMS
module. They are a predefined group of drivers and employees in a
vehicle. An airplane, i.e., has its pilots and crew members that attend
the passengers.

1. Go to TMS > Configuration > Settings > Drivers
2. Activate the "Manage Crews" checkbox and save the changes
3. Go to TMS > Configuration > Drivers > Crews
4. Create a new crew and assign it a name
5. Select the drivers, the personnel, and a default vehicle that the
crew uses
6. When a trip is created, you can assign the trip to an specific crew

Routes and stop locations
-------------------------

Routes can be used to establish predetermined trips from one location to
another.

1. Go to TMS > Configuration > Settings > Trips
2. Activate the "Routes" checkbox and save the changes
3. Go to Master Data > Routes and create a new route
4. Write the route's name, select the origin location and select the
origin destination
5. Create a new trip and enable the "Use a predefined route" checkbox
6. Select the route you have created for the trip

When activating routes in the settings, the option for creating stop
locations in routes is enabled.

1. Go to TMS > Configuration > Settings > Trips
2. Activate the "Stops" checkbox and save the changes
3. Go to Master Data > Routes and create a new route or select and
existing one
4. Enable the "Stop locations" checkbox
5. Write the locations in the "Stop locations" page

Usage
=====

Vehicles
--------

1. Go to TMS application.
2. Go to Master Data > Vehicles in the menu.
3. Create a new vehicle with the desired model (required).
4. In the TMS page select the operation type (Cargo/Passenger).
5. Type the capacity of the vehicle.

Drivers
-------

1. Go to TMS application.
2. Go to Master Data > Drivers in the menu.
3. Create a new driver.

Locations
---------

1. Go to TMS application.
2. Go to Master Data > Locations in the menu.
3. Create a new location.

Orders
------

1. Go to TMS application.
2. Create a new trip from the dashboard.
3. Select a driver, a vehicle, an origin location and a destination
location.
4. In the planning page select the start date, the duration and the
scheduled end.
5. Once confirmed, click 'START' button to start the trip.
6. Once the trip is completed, click 'END' button to end the trip.

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%0Aversion:%2017.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
-------

* Open Source Integrators

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

- Santiago Rodriguez [email protected]
- Edgar Martinez [email protected]
- Maxime Chambreuil [email protected]
- Israel Cruz [email protected]
- Alan Ramos [email protected]
- Luis Triana [email protected]
- Sarai Osorio [email protected]
- Oscar Garza [email protected]
- Hector Camacho [email protected]
- Luis Miguel Guzmán [email protected]
- Isabel Ávila [email protected]
- Erick Reza [email protected]
- Tecnativa: \* Sergio Teruel \* Carlos Dauden

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

- Open Source Integrators https://opensourceintegrators.com

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-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903
.. |maintainer-santiagordz| image:: https://github.com/santiagordz.png?size=40px
:target: https://github.com/santiagordz
:alt: santiagordz
.. |maintainer-EdgarRetes| image:: https://github.com/EdgarRetes.png?size=40px
:target: https://github.com/EdgarRetes
:alt: EdgarRetes

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

|maintainer-max3903| |maintainer-santiagordz| |maintainer-EdgarRetes|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions tms/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
43 changes: 43 additions & 0 deletions tms/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright (C) 2018 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Transport",
"summary": "Manage Vehicles, Drivers, Routes and Trips",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"category": "TMS",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-transport",
"depends": ["base", "uom", "fleet", "base_geolocalize"],
"data": [
"data/ir_sequence_data.xml",
"data/module_category.xml",
"data/tms_stage.xml",
"data/tms_team.xml",
"data/uom_category.xml",
max3903 marked this conversation as resolved.
Show resolved Hide resolved
"security/res_groups.xml",
"security/ir.model.access.csv",
"security/ir_rule.xml",
"views/res_config_settings.xml",
"views/res_partner.xml",
"views/fleet_vehicle.xml",
"views/tms_stage.xml",
"views/tms_order.xml",
"views/tms_team.xml",
"views/tms_crew.xml",
"views/tms_insurance.xml",
"views/tms_route.xml",
"views/menu.xml",
"views/fleet_menu.xml",
],
"demo": [
"demo/res_partner.xml",
"demo/tms_route.xml",
"demo/tms_order.xml",
"demo/tms_crew.xml",
"demo/tms_team.xml",
],
"application": True,
"development_status": "Alpha",
"maintainers": ["max3903", "santiagordz", "EdgarRetes"],
}
9 changes: 9 additions & 0 deletions tms/data/ir_sequence_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<odoo>
<record id="seq_tms_order" model="ir.sequence">
<field name="name">TMS Order</field>
<field name="code">tms.order</field>
<field name="prefix">TMS/</field>
<field name="padding">5</field>
<field name="company_id" eval="False" />
</record>
</odoo>
6 changes: 6 additions & 0 deletions tms/data/module_category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<odoo noupdate="1">
<record id="tms" model="ir.module.category">
<field name="name">Transport Management System</field>
<field name="sequence">20</field>
</record>
</odoo>
Loading
Loading