Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7623897
[ADD] fieldservice_fleet
brian10048 Oct 16, 2019
7e93378
[IMP] fieldservice_fleet
brian10048 Oct 25, 2019
12ba4c8
[IMP] fieldservice_fleet
brian10048 Nov 1, 2019
3c5ef2f
[IMP] fieldservice_fleet
brian10048 Nov 4, 2019
9cf3d14
[IMP] fieldservice_fleet: Add tests
brian10048 Dec 13, 2019
d974571
[FIX] fieldservice_fleet: Travis errors
max3903 Mar 20, 2020
78739f8
[IMP] fieldservice_fleet: black, isort, prettier
brian10048 Jul 21, 2020
988610f
[MIG] fieldservice_fleet: Migration to 13.0
brian10048 Jul 21, 2020
428e268
[MIG]fieldservice_fleet from version 13 to version 14
Khalid-SerpentCS Jan 19, 2021
9a42fbb
Added translation using Weblate (Italian)
mymage Nov 16, 2022
25ef23b
Added translation using Weblate (Spanish (Argentina))
ibuioli Jan 17, 2023
4340967
[MIG] fieldservice_fleet: Migration to 15.0
kaynnan Jul 10, 2023
6de1d98
Translated using Weblate (Spanish (Argentina))
ibuioli Aug 21, 2023
977353a
Translated using Weblate (Italian)
francesco-ooops Sep 20, 2023
4e0d376
Translated using Weblate (Spanish)
Ivorra78 Sep 25, 2023
d73e356
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 29, 2023
e5b438b
Translated using Weblate (Spanish)
Ivorra78 Nov 2, 2023
5e0a968
Translated using Weblate (Italian)
mymage Nov 6, 2023
e9fa626
[MIG] fieldservice_fleet: Migration to 16.0
rrebollo Jan 1, 2026
6f2de28
[IMP] fieldservice_fleet: pre-commit auto fixes
rrebollo Jan 1, 2026
649c2ba
[MIG] fieldservice_fleet: Migration to 17.0
rrebollo Jan 1, 2026
b1b8521
[IMP] fieldservice_fleet: pre-commit auto fixes
rrebollo Feb 13, 2026
ab9e093
[MIG] fieldservice_fleet: Migration to 18.0
rrebollo Feb 13, 2026
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
154 changes: 154 additions & 0 deletions fieldservice_fleet/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
===================
Field Service Fleet
===================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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%2Ffield--service-lightgray.png?logo=github
:target: https://github.com/OCA/field-service/tree/18.0/fieldservice_fleet
:alt: OCA/field-service
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/field-service-18-0/field-service-18-0-fieldservice_fleet
: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/field-service&target_branch=18.0
:alt: Try me on Runboat

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

This module allows you to link the vehicles and workers of Field Service
with vehicles and drivers of Fleet.

Beware that the Fleet module can have more vehicles than the FSM one
(not all vehicles of the company are used for Field Service work).

**Table of contents**

.. contents::
:local:

Installation
============

To install Field Service and have the mapping features, you need to
install GeoEngine.

Please refer to the installation instructions available at:
https://github.com/OCA/geospatial/tree/13.0/base_geoengine

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

Upon installation, any existing FSM Vehicles will have Fleet vehicles
created for them.

Go to Fleet and review the vehicles created from the existing FSM
vehicles

- Update the vehicle model as needed
- Update the odometer unit which is set to kilometers by default

Usage
=====

To use this module, you need to:

Fleet

- Go to Fleet
- Create or select a vehicle
- From Action menu, choose Convert to FSM Vehicle
- A new FSM Vehicle will be created linked to this Fleet Vehicle

Field Service

- Go to Field Service > Master Data > Vehicles
- Select or create a vehicle.
- Link to a Fleet Vehicle by assigining one to the vehicle details

Changing the Fleet vehicle driver sets the FSM Vehicle worker Changing
the FSM Vehicle worker sets the Fleet Vehicle driver

Known issues / Roadmap
======================

The roadmap of the Field Service application is documented on
`Github <https://github.com/OCA/field-service/issues/1>`__.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/field-service/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/field-service/issues/new?body=module:%20fieldservice_fleet%0Aversion:%2018.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
-------

* Brian McMaster
* Open Source Integrators

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

- Wolfgang Hall <whall@opensourceintegrators.com>
- Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
- Mohammad Khalid <mkhalid@opensourceintegrators.com>
- Brian McMaster <brian@mcmpest.com>

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

The development of this module has been financially supported by:

- Open Source Integrators <https://opensourceintegrators.com>
- McMaster Lawn & Pest Services <https://www.mcmpest.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-wolfhall| image:: https://github.com/wolfhall.png?size=40px
:target: https://github.com/wolfhall
:alt: wolfhall
.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903
.. |maintainer-brian10048| image:: https://github.com/brian10048.png?size=40px
:target: https://github.com/brian10048
:alt: brian10048

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

|maintainer-wolfhall| |maintainer-max3903| |maintainer-brian10048|

This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/18.0/fieldservice_fleet>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
7 changes: 7 additions & 0 deletions fieldservice_fleet/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (C) 2019 Open Source Integrators
# Copyright (C) 2019 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
from . import wizard
from .hooks import pre_init_hook
26 changes: 26 additions & 0 deletions fieldservice_fleet/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2019 Open Source Integrators
# Copyright (C) 2019 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Field Service Fleet",
"summary": "Link Field Service vehicles with Odoo Fleet",
"version": "18.0.1.0.0",
"category": "Field Service",
"author": "Brian McMaster, "
"Open Source Integrators, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/field-service",
"depends": ["fieldservice_vehicle", "fleet"],
"data": [
"security/ir.model.access.csv",
"views/fsm_vehicle.xml",
"views/fleet_vehicle.xml",
"wizard/fsm_fleet_wizard.xml",
],
"license": "AGPL-3",
"development_status": "Beta",
"maintainers": ["wolfhall", "max3903", "brian10048"],
"pre_init_hook": "pre_init_hook",
"installable": True,
}
61 changes: 61 additions & 0 deletions fieldservice_fleet/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright (C) 2019 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


def pre_init_hook(env):
# Check for existing fsm vehicles
cr = env.cr
cr.execute("SELECT * FROM fsm_vehicle")
vehicles = cr.dictfetchall()
if vehicles:
# Get a fleet vehicle model to set on the new Fleet vehicle(s)
model = env["fleet.vehicle.model"].search([], limit=1)
# Create a new Fleet vehicle for each FSM vehicle
for veh in vehicles:
# Get the FSM worker to set as the Fleet driver
fsm_person_id = veh.get("person_id", False)
driver_id = False
if fsm_person_id:
driver_id = env["fsm.person"].browse(fsm_person_id).partner_id.id
cr.execute(
"""
INSERT INTO fleet_vehicle (
name,
model_id,
driver_id,
is_fsm_vehicle,
odometer_unit,
power_unit,
active)
VALUES (
%s,
%s,
%s,
True,
'kilometers',
%s,
True);""",
(
veh.get("name"),
model.id,
driver_id,
model.power_unit,
),
)
# Set this new Fleet vehicle on the existing FSM vehicle
cr.execute(
"""
SELECT id
FROM fleet_vehicle
ORDER BY id desc
LIMIT 1
"""
)
fleet = cr.dictfetchone()
cr.execute(
"""
UPDATE fsm_vehicle
SET fleet_vehicle_id = %s
WHERE id = %s;""",
(fleet.get("id"), veh.get("id")),
)
Loading