Skip to content

[19.0][MIG] fleet vehicle ownership: Migration to 19.0#219

Open
DenerWilliam wants to merge 12 commits intoOCA:19.0from
DenerWilliam:19.0-mig-fleet_vehicle_ownership
Open

[19.0][MIG] fleet vehicle ownership: Migration to 19.0#219
DenerWilliam wants to merge 12 commits intoOCA:19.0from
DenerWilliam:19.0-mig-fleet_vehicle_ownership

Conversation

@DenerWilliam
Copy link

Migration to Odoo 19.0

Changes made for Odoo 19 compatibility:

  • Manifest: version 19.0.1.0.0; dependency "contacts" added for the
    res.partner view (Contacts app).

  • fleet_vehicle (model): owner_id field kept; no API changes.

  • fleet_vehicle (views): Owner field inserted after "driver_id" in form
    and tree instead of "company_id", so Owner appears in single-company
    databases (in single-company the Company field is not in the
    fleet.vehicle view).

  • res.partner (model): vehicle_ids without required=True (allows partners
    without vehicles); vehicle_count with compute as string
    ("_compute_vehicle_count") for inheritance and pylint E8147 compliance.

  • res.partner (view): Vehicles button with context default_owner_id to
    set the owner when creating a vehicle from the contact.

@DenerWilliam DenerWilliam force-pushed the 19.0-mig-fleet_vehicle_ownership branch from 0a3442b to 54af1d4 Compare February 2, 2026 15:13
"website": "https://github.com/OCA/fleet",
"maintainers": ["cubells"],
"depends": ["fleet"],
"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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants