← Back to the website

TMS Energy user manual

How every part of the base_tms_energy module works in Odoo 20, step by step.

01 · Getting started

Installation and the TMS menu

base_tms_energy adds the TMS app to Odoo. It builds on the standard Accounting, Fleet, Maintenance, Employees, Sales, Products and Discuss apps, which are installed automatically as dependencies.

  1. 1Copy the base_tms_energy folder into the addons path of your Odoo 20 (the server needs the openpyxl Python library, already included in the official Odoo image).
  2. 2In Apps, click «Update Apps List», search for «TMS Energy» and install it.
  3. 3Open the TMS app: its menu has Home (requests, import, checklists and km sheets), Data (routes, price lists, vehicles and sets), Employees, Fuel, Agenda, Records, Views (GPS map) and Maintenance.
The TMS app on the Odoo 20 home screen
Figure 1. The TMS app on the Odoo 20 home screen

02 · Master data

Routes

A route links an origin and a destination (Odoo contacts: terminals, plants, stations) with its distance, duration and base price. Every transport request starts from a route.

  1. 1Go to TMS → Data → Routes and click «New».
  2. 2Enter the name, the origin («From») and destination («To»), the distance in km, the duration in hours and the price.
  3. 3Choose the type: Local or Long distance. If the route has several legs, add them as lines, each with its origin, destination, distance and duration.
  4. 4Click «Create product» to generate a service product linked to the route: you can then sell it on sales orders and create the requests from them.
Route list
Figure 2. Route list
A route with its legs
Figure 3. A route with its legs

03 · Master data

Price lists per customer

Each customer can have its own price for a route, with validity dates. The price cannot be negative and the end date must be after the start date.

  1. 1Go to TMS → Data → Route price lists and click «New».
  2. 2Choose the route, the customer and the price, and optionally the start and end dates.
  3. 3The name is built automatically: «Route - Customer ($price)».
Prices per route and customer
Figure 4. Prices per route and customer

04 · Fleet

Vehicles and models

The module extends Fleet vehicles with the data an energy carrier needs and adds shortcuts to their tyres, maintenance orders and fuel fills.

  1. 1On the vehicle (TMS → Data → Vehicles), «Tax info» tab: engine number, insurance company and policy number, whether it has a ladder, and load capacity in kg and m³.
  2. 2«GPS location» tab: latitude, longitude, date and notes of the last position, and the transport request in progress.
  3. 3The header buttons show how many tyre changes, maintenance orders and fuel fills it has, and open them.
  4. 4The vehicle model gets the engine displacement, height, length and width, the fuel and AdBlue tank capacities, the cabin type (cab-over or bonneted), the beds and the total weight.
A vehicle with its GPS position and shortcuts
Figure 5. A vehicle with its GPS position and shortcuts

05 · Fleet

Tractor + trailer sets

A set groups the main vehicle (tractor) and the secondary one (semi-trailer or tanker) that travel together. On the request you choose the set, so it is clear which equipment does each trip.

  1. 1Go to TMS → Data → Sets and click «New».
  2. 2Enter a name, choose the main and the secondary vehicle and save.
Fleet sets
Figure 6. Fleet sets

06 · Operations

Transport requests

The request is the heart of the module: a trip for a customer along a route, with its set, vehicle, driver, weights, price and start and end coordinates.

  1. 1Go to TMS → Home → Transport request and click «New». The number (TRQ/00001…) is assigned automatically.
  2. 2Choose the customer (contact) and the route: the distance, duration and price are filled in. Add the set, vehicle, driver, a co-driver if any, the date and the net and gross weights.
  3. 3Move the request through the status bar: Draft → Confirmed → Programmed → Assigned → Inspected → In progress → Done → Audited → Invoiced (or Cancelled).
  4. 4In the «GPS location» tab record the start and end coordinates; the form shows them ready to paste into Google Maps.
  5. 5To invoice, select requests in Done or Audited state in the list and use the «Create Invoices» action: one invoice per customer is created, with a line per trip. A request that is already invoiced is never invoiced twice.

Tip: From a sales order with route products, the «Crear solicitudes de transporte» (create transport requests) button creates one request per unit of each line (without duplicates if you click it again). From a route product, the «Crear solicitudes TMS» button opens a wizard that creates several requests at once for a customer, with date and price.

Request list, coloured by state, with totals
Figure 7. Request list, coloured by state, with totals
A request in progress with its GPS location
Figure 8. A request in progress with its GPS location

07 · Operations

Import requests from Excel

If your customers send their orders in a spreadsheet, the importer creates the requests in bulk and shows you which rows have errors before creating anything.

  1. 1Go to TMS → Home → Import requests and click «New».
  2. 2Click «Descargar plantilla» (download template) to get the Excel file with the expected columns: contact, product code and quantity.
  3. 3Upload the file and click «Procesar archivo» (process file): every row is validated (customer, route product) and marked as valid or with its error message.
  4. 4Check the valid and error counters and click «Create requests». From the import you can open the requests it created.
Request importer from Excel
Figure 9. Request importer from Excel

08 · Operations

Vehicle checklists

Before leaving, the driver checks the vehicle item by item. Templates avoid typing the same items every time.

  1. 1Create a list marked as «Template» with the usual items (lights, tyres, extinguisher, spill kit, valves, documents…).
  2. 2For every inspection create a list with the date, vehicle and driver; tick each item as checked and add observations.
  3. 3Click «Complete» when done; you can set it back to draft or cancel it.
A checklist with a pending item and its observation
Figure 10. A checklist with a pending item and its observation

09 · Operations

Kilometre sheet

The sheet collects the trips of a driver and a vehicle with the kilometres per coefficient (1.20, 1.40 and 100 %), useful for settlements and agreements.

  1. 1Go to TMS → Home → KM sheet and click «New»: choose date, driver, vehicle and plate.
  2. 2Add a line per trip: departure date and place, arrival date and place, kilometres driven, unloading check, stay and whether it crosses a border.
  3. 3Split the kilometres at the 1.20 and 1.40 coefficients: the 100 % ones are computed automatically (driven − 1.20 − 1.40). The header adds up the totals.
  4. 4Click «Print» to get the sheet as a PDF.
Kilometre sheet with its lines
Figure 11. Kilometre sheet with its lines
PDF report of the sheet
Figure 12. PDF report of the sheet

10 · Fleet

Fuel register

Every diesel (G) or urea/AdBlue (U) fill is recorded with its cost and the vehicle efficiency, to spot unusual consumption.

  1. 1Go to TMS → Fuel → Fuel register and click «New».
  2. 2Enter vehicle, driver, date and time, type (G or U), litres, odometer kilometres and distance since the previous fill, whether the tank was filled, the coupon, the station and the price per litre.
  3. 3The record computes the cost, km/l and litres per 100 km. You can attach the receipt and link the supplier invoice.
  4. 4Use the «Marcar OK» action to flag the records you validate as reviewed.
Fuel fills with their efficiency
Figure 13. Fuel fills with their efficiency

11 · Maintenance

Tyre control

Record every tyre change with its position and the vehicle kilometres, to know how long each tyre lasts.

  1. 1Go to TMS → Maintenance → Tyre control and click «New».
  2. 2Choose vehicle, driver, position (front/rear, left/right or spare), installation km, brand, model, size, serial number and date.
  3. 3From the vehicle, the «Changes» button lists all its tyres.
Tyre changes
Figure 14. Tyre changes

12 · Maintenance

Maintenance orders

An order gathers the parts and services of a maintenance job with their cost, so you know what each vehicle costs.

  1. 1Go to TMS → Maintenance → Maintenance orders and click «New».
  2. 2Choose vehicle, driver and date and add lines with product, description, quantity and unit cost: the total is computed automatically.
  3. 3Move the order forward: Draft → Confirmed → Done (or Cancelled).
Maintenance order with its parts
Figure 15. Maintenance order with its parts

13 · Control

Due-date agenda

Technical inspections, insurance, permits or licences: every due date goes into the agenda with its category, vehicle or driver. A scheduled task checks it every 8 hours and flags as «Expired» whatever is past.

  1. 1Create the categories in TMS → Agenda → Categories (for example Technical inspection, Mandatory insurance, Driving licence).
  2. 2Add each due date in TMS → Agenda with its date, category, vehicle or driver, location and notes.
  3. 3Filter by status to see what is expired and act in time.
Agenda with a due date already flagged as expired
Figure 16. Agenda with a due date already flagged as expired

14 · Control

Entry and exit records

Write down when a vehicle enters or leaves a plant or terminal, with its driver and notes, to trace every movement.

  1. 1Go to TMS → Records and click «New».
  2. 2Choose the type (In or Out), date and time, vehicle, driver and category, and add notes.
Entry and exit records
Figure 17. Entry and exit records

15 · Fleet

Fleet GPS map

TMS → Views → Map view opens a map (OpenStreetMap) with every vehicle that has a GPS position, its plate, driver and the time of the last position.

  1. 1Record the latitude and longitude in the «GPS location» tab of each vehicle (or update them from your GPS system through the Odoo API).
  2. 2Open the map: the list on the left can be filtered by name or plate; clicking a vehicle centres the map on it.
  3. 3Each vehicle popup links to its record in Odoo.
GPS map with the fleet
Figure 18. GPS map with the fleet

16 · Drivers

Drivers and portal access

Drivers are Odoo employees. The module adds their cost per kilometre, their payroll configuration and their TMS portal credentials.

  1. 1Open the employee in TMS → Employees → Employees.
  2. 2Set their «Cost» (the amount paid per kilometre) and their «Payroll configuration».
  3. 3In the TMS portal section enter a username and a password, tick «Portal active» and share the /tms/portal address with the driver.
Driver sign-in to the portal
Figure 19. Driver sign-in to the portal

17 · Drivers

Driver portal

From their phone, drivers see their requests and move them forward without needing an Odoo user.

  1. 1The driver opens /tms/portal and signs in with their username and password.
  2. 2They see a summary (total, in progress, completed and pending) and the list of their trips with route, vehicle, date and state; they can filter it.
  3. 3On an assigned or programmed trip they click «Start Journey» (it moves to In progress) and, on arrival, «Complete Journey» (it moves to Done).
The driver’s trips in the portal
Figure 20. The driver’s trips in the portal
Trip details in the portal
Figure 21. Trip details in the portal

18 · Drivers

Payroll from trips

Payroll is computed from trips: each line is the request distance times the driver’s cost per kilometre. Confirming it creates a summary per driver and an individual payroll with the rules of their configuration.

  1. 1In the request list select the trips to pay and use the «Create payroll» action: choose the date and add notes.
  2. 2Check the lines (request, customer, driver, vehicle, route and amount) and click «Confirm»: the summary per driver (trips and total) and the individual payrolls are generated.
  3. 3Each individual payroll applies the salary rules of the driver’s configuration; confirm it, mark it as paid and print it as a PDF.
  4. 4Mark the main payroll as processed when you are done.
Payroll with the summary per driver
Figure 22. Payroll with the summary per driver
Individual payroll with its rules
Figure 23. Individual payroll with its rules

19 · Drivers

Payroll configurator

A configuration is a set of salary rules, each with a code and a formula. They are applied in order and each rule can use the result of the previous ones.

  1. 1Go to TMS → Employees → Payroll configurator and create a configuration.
  2. 2Add rules with sequence, code, name and formula. In the formula use NET_SALARY (the amount of the driver’s trips), numbers, the codes of previous rules and the + − * / operators and parentheses.
  3. 3Example: BASE = NET_SALARY · BONUS = 50 · DEDUCT = -30 · TOTAL = BASE + BONUS + DEDUCT.
  4. 4Assign the configuration to each driver on their employee record.

Tip: Rule codes must be unique within each configuration. If a formula has an error, confirming the payroll tells you which rule and why.

A configuration with its salary rules
Figure 24. A configuration with its salary rules