From dabf7853a4b9e97331424ef75a76216352245633 Mon Sep 17 00:00:00 2001
From: EdgarRetes
Date: Wed, 9 Oct 2024 11:33:08 -0600
Subject: [PATCH] [FIX] tms: pre-commit
---
tms/README.rst | 10 +++++-----
tms/__manifest__.py | 2 +-
tms/models/fleet_vehicle.py | 2 +-
tms/models/tms_driver.py | 1 +
tms/models/tms_insurance.py | 1 +
tms/models/tms_order.py | 14 +++++++++-----
tms/security/res_groups.xml | 5 +++++
tms/static/description/index.html | 6 +++---
tms/views/res_partner.xml | 14 +++++++-------
tms/views/tms_crew.xml | 2 +-
tms/views/tms_driver.xml | 18 +++++++++---------
tms/views/tms_insurance.xml | 10 +++++-----
tms/views/tms_order.xml | 26 +++++++++++---------------
tms/views/tms_route.xml | 16 ++++++++--------
tms/views/tms_stage.xml | 12 ++++++------
tms/views/tms_team.xml | 4 ++--
16 files changed, 75 insertions(+), 68 deletions(-)
diff --git a/tms/README.rst b/tms/README.rst
index a09288f8..8d6d583a 100644
--- a/tms/README.rst
+++ b/tms/README.rst
@@ -17,13 +17,13 @@ Transport
: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
+ :target: https://github.com/OCA/stock-logistics-transport/tree/18.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
+ :target: https://translation.odoo-community.org/projects/stock-logistics-transport-18-0/stock-logistics-transport-18-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
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-transport&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -161,7 +161,7 @@ Bug Tracker
Bugs are tracked on `GitHub 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -222,6 +222,6 @@ Current `maintainers `__:
|maintainer-max3903| |maintainer-santiagordz| |maintainer-EdgarRetes|
-This module is part of the `OCA/stock-logistics-transport `_ project on GitHub.
+This module is part of the `OCA/stock-logistics-transport `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/tms/__manifest__.py b/tms/__manifest__.py
index e347fe45..62d7b748 100644
--- a/tms/__manifest__.py
+++ b/tms/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "Transport",
"summary": "Manage Vehicles, Drivers, Routes and Trips",
- "version": "17.0.1.0.0",
+ "version": "18.0.1.0.0",
"license": "AGPL-3",
"category": "TMS",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
diff --git a/tms/models/fleet_vehicle.py b/tms/models/fleet_vehicle.py
index 4f89ab4a..a0c9f0af 100644
--- a/tms/models/fleet_vehicle.py
+++ b/tms/models/fleet_vehicle.py
@@ -9,7 +9,7 @@ class FleetVehicle(models.Model):
tms_team_id = fields.Many2one("tms.team")
- tms_driver_id = fields.Many2one("tms.driver", string="Driver")
+ tms_driver_id = fields.Many2one("tms.driver", string="Driver Id")
# Operation
operation = fields.Selection([("cargo", "Cargo"), ("passenger", "Passenger")])
diff --git a/tms/models/tms_driver.py b/tms/models/tms_driver.py
index fe9f0c3b..6ba9f366 100644
--- a/tms/models/tms_driver.py
+++ b/tms/models/tms_driver.py
@@ -16,6 +16,7 @@ class TmsDriver(models.Model):
_name = "tms.driver"
_inherit = ["mail.thread"]
_inherits = {"res.partner": "partner_id"}
+ _description = "Model for TMS drivers"
partner_id = fields.Many2one("res.partner", required=True, ondelete="cascade")
diff --git a/tms/models/tms_insurance.py b/tms/models/tms_insurance.py
index fc52c28c..ce75c8c9 100644
--- a/tms/models/tms_insurance.py
+++ b/tms/models/tms_insurance.py
@@ -7,6 +7,7 @@
class TMSInsurance(models.Model):
_name = "tms.insurance"
+ _description = "Model for TMS insurances"
active = fields.Boolean(default=True)
company_id = fields.Many2one(
diff --git a/tms/models/tms_order.py b/tms/models/tms_order.py
index ec79abbc..fa05d6e4 100644
--- a/tms/models/tms_order.py
+++ b/tms/models/tms_order.py
@@ -38,9 +38,12 @@ class TMSOrder(models.Model):
route_id = fields.Many2one(
"tms.route", compute="_compute_route_id", store=True, readonly=False
)
- route_origin = fields.Char(related="route_id.origin_location_id.display_name")
+ route_origin = fields.Char(
+ related="route_id.origin_location_id.display_name", string="Route origin"
+ )
route_destination = fields.Char(
- related="route_id.destination_location_id.display_name"
+ related="route_id.destination_location_id.display_name",
+ string="Route destination",
)
origin_id = fields.Many2one(
@@ -60,8 +63,8 @@ class TMSOrder(models.Model):
readonly=False,
)
- origin_location = fields.Char(string="Origin")
- destination_location = fields.Char(string="Destination")
+ origin_location = fields.Char()
+ destination_location = fields.Char()
driver_id = fields.Many2one(
"tms.driver",
@@ -270,7 +273,8 @@ def _compute_active_crew(self):
]
@api.model
- def _read_group_stage_ids(self, stages, domain, order):
+ def _read_group_stage_ids(self, stages, domain, order=None):
+ order = order or "sequence, id"
return self.env["tms.stage"].search([("stage_type", "=", "order")], order=order)
def button_start_order(self):
diff --git a/tms/security/res_groups.xml b/tms/security/res_groups.xml
index e86e76ae..5f1d9e50 100644
--- a/tms/security/res_groups.xml
+++ b/tms/security/res_groups.xml
@@ -53,4 +53,9 @@
+
+ Manage TMS Oum
+
+
+
diff --git a/tms/static/description/index.html b/tms/static/description/index.html
index 87452267..22d8dc7d 100644
--- a/tms/static/description/index.html
+++ b/tms/static/description/index.html
@@ -369,7 +369,7 @@ Transport
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b2144995fbc4816a0cf4cd0a224ae48f0ea6da9c795b3f9592dd407235dcf7f8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
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
@@ -526,7 +526,7 @@
Bugs are tracked on GitHub 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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
diff --git a/tms/views/res_partner.xml b/tms/views/res_partner.xml
index cdf1c6cd..f74cf9cf 100644
--- a/tms/views/res_partner.xml
+++ b/tms/views/res_partner.xml
@@ -1,18 +1,18 @@
-
- res.partner.tree.tms.location
+
+ res.partner.list.tms.location
res.partner
-
+
-
+
@@ -29,7 +29,7 @@
True
-
+
False
@@ -66,12 +66,12 @@
name="context"
>{"search_default_tms_location": True, "default_tms_location": True}
- tree,form
+ list,form
diff --git a/tms/views/tms_crew.xml b/tms/views/tms_crew.xml
index a0883473..4b67d118 100644
--- a/tms/views/tms_crew.xml
+++ b/tms/views/tms_crew.xml
@@ -98,6 +98,6 @@
Crews
tms.crew
- tree,form
+ list,form
diff --git a/tms/views/tms_driver.xml b/tms/views/tms_driver.xml
index 0e8fb517..7b7ab476 100644
--- a/tms/views/tms_driver.xml
+++ b/tms/views/tms_driver.xml
@@ -1,14 +1,14 @@
-
- tms.driver.tree
+
+ tms.driver.list
tms.driver
-
+
-
+
@@ -24,7 +24,7 @@
name="stage_id"
widget="statusbar"
domain="[('stage_type', '=', 'driver')]"
- options="{'clickable':True}, {'fold_field':'fold'}"
+ options="{'clickable':True, 'fold_field':'fold'}"
/>
@@ -36,7 +36,7 @@
True
-
+
False
@@ -197,13 +197,13 @@
Drivers
tms.driver
[('is_company', '=', False)]
- kanban,tree,form
+ kanban,list,form
@@ -212,6 +212,6 @@
Drivers
tms.driver
- tree,form
+ list,form
diff --git a/tms/views/tms_insurance.xml b/tms/views/tms_insurance.xml
index a9c17403..f6b33257 100644
--- a/tms/views/tms_insurance.xml
+++ b/tms/views/tms_insurance.xml
@@ -1,15 +1,15 @@
-
- tms.insurance.view.tree
+
+ tms.insurance.view.list
tms.insurance
-
+
-
+
@@ -55,7 +55,7 @@
Insurance Policies
tms.insurance
- tree,form
+ list,form
diff --git a/tms/views/tms_order.xml b/tms/views/tms_order.xml
index 39b80a6d..d29f0e3b 100644
--- a/tms/views/tms_order.xml
+++ b/tms/views/tms_order.xml
@@ -1,12 +1,12 @@
-
-
- tms.order.view.tree
+
+
+ tms.order.view.list
tms.order
-
+
@@ -28,7 +28,7 @@
class="btn btn-primary text-uppercase"
invisible="not start_trip or end_trip"
/>
-
+
@@ -75,7 +75,7 @@
name="stage_id"
widget="statusbar"
domain="[('stage_type', '=', 'order')]"
- options="{'clickable':True}, {'fold_field':'fold'}"
+ options="{'clickable':True, 'fold_field':'fold'}"
/>
@@ -176,11 +176,7 @@
-
-
-
-
-
+
@@ -408,7 +404,7 @@
Trips
tms.order
- tree,form
+ list,form
@@ -420,19 +416,19 @@
Stages
tms.order
- tree,form
+ list,form
Trips
tms.order
- kanban,tree,form
+ kanban,list,form
Trips Kanban
tms.order
- kanban,tree,form
+ kanban,list,form
[('tms_team_id', '=', active_id)]
diff --git a/tms/views/tms_route.xml b/tms/views/tms_route.xml
index b87132a3..ade19518 100644
--- a/tms/views/tms_route.xml
+++ b/tms/views/tms_route.xml
@@ -1,15 +1,15 @@
-
-
- tms.route.view.tree
+
+
+ tms.route.view.list
tms.route
-
+
-
+
@@ -95,9 +95,9 @@
widget="many2many"
domain="[('tms_location', '=', 'True')]"
>
-
+
-
+
@@ -129,7 +129,7 @@
Routes
tms.route
- tree,form
+ list,form
diff --git a/tms/views/tms_stage.xml b/tms/views/tms_stage.xml
index 03fc8514..c5c5f4be 100644
--- a/tms/views/tms_stage.xml
+++ b/tms/views/tms_stage.xml
@@ -1,14 +1,14 @@
-
-
- tms.stage.tree
+
+
+ tms.stage.list
tms.stage
-
+
-
+
@@ -79,7 +79,7 @@
Stages
tms.stage
- tree,form
+ list,form
{'search_default_group_stage_type': 1}
diff --git a/tms/views/tms_team.xml b/tms/views/tms_team.xml
index 25d0298a..2641ca09 100644
--- a/tms/views/tms_team.xml
+++ b/tms/views/tms_team.xml
@@ -150,13 +150,13 @@
Teams
tms.team
- kanban,tree,form
+ kanban,list,form
Teams
tms.team
- tree,form
+ list,form