Skip to content
Open
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
122 changes: 122 additions & 0 deletions fleet_vehicle_ownership/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=======================
Fleet Vehicle Ownership
=======================

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

.. |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/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%2Ffleet-lightgray.png?logo=github
:target: https://github.com/OCA/fleet/tree/19.0/fleet_vehicle_ownership
:alt: OCA/fleet
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/fleet-19-0/fleet-19-0-fleet_vehicle_ownership
: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/fleet&target_branch=19.0
:alt: Try me on Runboat

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

This module extends the functionality of fleet to support vehicle owner
data and to allow you to add vehicle ownership, linking partners to
vehicles.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

This is an extension of the 'fleet.vehicle' model in the Odoo framework.
It introduces a new field, 'owner_id', to track and associate the owner
of a vehicle.

Fields:

- owner_id: Many2one field linking to the 'res.partner' model. It
represents the owner of the vehicle.

Usage:

- This extension is particularly useful in scenarios where it's
essential to associate each fleet vehicle with a specific owner.
- The 'owner_id' field can be utilized to establish relationships with
partners in the 'res.partner' model, facilitating clear ownership
tracking.

Usage
=====

To use this module, you need to:

1. Go to the vehicle form and associate an owner or go to the partner
form and associate a vehicle.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/fleet/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/fleet/issues/new?body=module:%20fleet_vehicle_ownership%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
-------

* RPSJR

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

- Raimundo Junior raimundopsjr@gmail.com

- ``Trey Kilobytes de Soluciones SL <https://www.trey.es>``\ \_\_:

- Vicent Cubells vicent@trey.es

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

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

|maintainer-cubells|

This module is part of the `OCA/fleet <https://github.com/OCA/fleet/tree/19.0/fleet_vehicle_ownership>`_ 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 fleet_vehicle_ownership/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions fleet_vehicle_ownership/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2023 RPSJR
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Fleet Vehicle Ownership",
"summary": "Add vehicle ownership, linking partners to vehicles",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"author": "RPSJR,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/fleet",
"maintainers": ["cubells"],
"depends": ["fleet", "contacts"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here there is no need to depend on the Contacts module

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Fleet Vehicle Ownership module depends on Contacts because the vehicle owner is a contact (res.partner), and the module extends the contact form (model and view) to show and access that contact’s vehicles.

In a fresh installation, the Contacts module is not installed by default. If we did not declare contacts as a dependency, Fleet Vehicle Ownership could be installed in an environment where the Contacts app is missing: the extension of the contact form (and the vehicles button) would not work as intended. By declaring the dependency, we ensure that when Fleet Vehicle Ownership is installed, Contacts is installed automatically and the module works correctly in any installation.

"data": [
"views/res_partner_views.xml",
"views/fleet_vehicle_views.xml",
],
"demo": [
"demo/fleet_vehicle.xml",
],
}
19 changes: 19 additions & 0 deletions fleet_vehicle_ownership/demo/fleet_vehicle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 RPSJR
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="vehicle_29" model="fleet.vehicle">
<field name="license_plate">4-LH-44</field>
<field name="vin_sn">44444</field>
<field name="model_id">1</field>
<field name="color">Silver</field>
<field name="location">Silverstone</field>
<field name="owner_id" ref="base.partner_demo" />
<field
name="acquisition_date"
eval="(DateTime.now() - timedelta(days=336)).strftime('%Y-%m-%d')"
/>
<field name="odometer_unit">kilometers</field>
<field name="car_value">44000</field>
</record>
</odoo>
66 changes: 66 additions & 0 deletions fleet_vehicle_ownership/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fleet_vehicle_ownership
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-06-21 08:01+0000\n"
"PO-Revision-Date: 2025-06-21 10:02+0200\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 3.6\n"

#. module: fleet_vehicle_ownership
#: model_terms:ir.ui.view,arch_db:fleet_vehicle_ownership.view_partner_vehicle_owner_form
msgid "<span class=\"o_stat_text\"> Vehicles</span>"
msgstr "<span class=\"o_stat_text\"> Vehículos</span>"

#. module: fleet_vehicle_ownership
#: model:ir.model,name:fleet_vehicle_ownership.model_res_partner
msgid "Contact"
msgstr "Contacto"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_partner__vehicle_count
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_users__vehicle_count
msgid "Number of Vehicles"
msgstr "Número de Vehículos"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_fleet_vehicle__owner_id
msgid "Owner"
msgstr "Propietario"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,help:fleet_vehicle_ownership.field_fleet_vehicle__owner_id
msgid "Owner of the vehicle"
msgstr "Propietario del vehículo"

#. module: fleet_vehicle_ownership
#: model:ir.model,name:fleet_vehicle_ownership.model_fleet_vehicle
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_partner__vehicle_ids
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_users__vehicle_ids
msgid "Vehicle"
msgstr "Vehículo"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,help:fleet_vehicle_ownership.field_res_partner__vehicle_ids
#: model:ir.model.fields,help:fleet_vehicle_ownership.field_res_users__vehicle_ids
msgid "Vehicles owned by this partner"
msgstr "Vehículos propiedad de este socio"

#~ msgid "Display Name"
#~ msgstr "Mostrar Nombre"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Última Modificación el"
53 changes: 53 additions & 0 deletions fleet_vehicle_ownership/i18n/fleet_vehicle_ownership.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fleet_vehicle_ownership
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: fleet_vehicle_ownership
#: model_terms:ir.ui.view,arch_db:fleet_vehicle_ownership.view_partner_vehicle_owner_form
msgid "<span class=\"o_stat_text\"> Vehicles</span>"
msgstr ""

#. module: fleet_vehicle_ownership
#: model:ir.model,name:fleet_vehicle_ownership.model_res_partner
msgid "Contact"
msgstr ""

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_partner__vehicle_count
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_users__vehicle_count
msgid "Number of Vehicles"
msgstr ""

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_fleet_vehicle__owner_id
msgid "Owner"
msgstr ""

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,help:fleet_vehicle_ownership.field_fleet_vehicle__owner_id
msgid "Owner of the vehicle"
msgstr ""

#. module: fleet_vehicle_ownership
#: model:ir.model,name:fleet_vehicle_ownership.model_fleet_vehicle
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_partner__vehicle_ids
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_users__vehicle_ids
msgid "Vehicle"
msgstr ""

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,help:fleet_vehicle_ownership.field_res_partner__vehicle_ids
#: model:ir.model.fields,help:fleet_vehicle_ownership.field_res_users__vehicle_ids
msgid "Vehicles owned by this partner"
msgstr ""
74 changes: 74 additions & 0 deletions fleet_vehicle_ownership/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fleet_vehicle_ownership
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-30 15:35+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: fleet_vehicle_ownership
#: model_terms:ir.ui.view,arch_db:fleet_vehicle_ownership.view_partner_vehicle_owner_form
msgid "<span class=\"o_stat_text\"> Vehicles</span>"
msgstr "<span class=\"o_stat_text\"> Veicoli</span>"

#. module: fleet_vehicle_ownership
#: model:ir.model,name:fleet_vehicle_ownership.model_res_partner
msgid "Contact"
msgstr "Contatto"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_fleet_vehicle__display_name
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_partner__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_fleet_vehicle__id
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_partner__id
msgid "ID"
msgstr "ID"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_fleet_vehicle____last_update
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_partner____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_partner__vehicle_count
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_users__vehicle_count
msgid "Number of Vehicles"
msgstr "Numero di veicoli"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_fleet_vehicle__owner_id
msgid "Owner"
msgstr "Proprietario"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,help:fleet_vehicle_ownership.field_fleet_vehicle__owner_id
msgid "Owner of the vehicle"
msgstr "Proprietario del veicolo"

#. module: fleet_vehicle_ownership
#: model:ir.model,name:fleet_vehicle_ownership.model_fleet_vehicle
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_partner__vehicle_ids
#: model:ir.model.fields,field_description:fleet_vehicle_ownership.field_res_users__vehicle_ids
msgid "Vehicle"
msgstr "Veicolo"

#. module: fleet_vehicle_ownership
#: model:ir.model.fields,help:fleet_vehicle_ownership.field_res_partner__vehicle_ids
#: model:ir.model.fields,help:fleet_vehicle_ownership.field_res_users__vehicle_ids
msgid "Vehicles owned by this partner"
msgstr "Veicoli proprietà di questo partner"
Loading