Fleet - Odoo 20 Community Book

Contracts

The List of Contracts

Fleet > Contracts lists the contracts of all the vehicles. It opens with the filter In Progress. The columns are Name, Contract Type, Contract Start Date, Contract Expiration Date (shown as a distance in time, here In 2 months), Vehicle, Vendor, Driver, Recurring Cost, Recurring Cost Frequency and Status (the badge Running). The five icons at the top right give list, kanban, graph, pivot and activity views.

odoo Development

The button Contracts on a vehicle opens the same list, only for that vehicle, with the vehicle in the path at the top.

odoo Development

The search box finds a contract by vehicle, driver, employee or vendor. The filters are In Progress, Expired, Done, Start Date, Expiration Date and Archived, and the group is Vehicle.

The Contract Form

Click New, or open a contract. We made the contract Omnium Transit for the Transit. The numbers are explained below.

odoo Development

Close (1). A button at the top left that closes the contract. The buttons depend on the state. A Running contract has Close. An Expired contract has Mark as Done and Close. A Done contract has Reactivate (section 3.4).

Status bar (2). New, Running. The states are New (an incoming contract), Running, Expired, Done and Closed. Odoo sets the state itself from the two dates, when you save: our contract started on Jan 15 and ends on Jan 14, 2027, so it is Running.

Employee (3). A smart button (module hr_fleet) that opens the employee who drives the vehicle.

Reference (4). The reference of the contract at the vendor, for example the number of the insurance policy. Ours is INS-2026-77.

Contract Type (5). Leasing or Omnium (section 1.7). The title of the form is the name of the contract.

Vendor (6). The leasing company or the insurer.

Included Services (7). The services that the contract covers, from the list of service types.

Contract Start Date (8) and Contract Expiration Date (9). The dates of the coverage. The start date is today by default, and the expiration date is one year after it by default. The alert of section 3.4 works on the expiration date.

Responsible (10). The user who looks after the contract. It is filled with the Fleet Manager of the vehicle when you start the contract from the vehicle. The reminder of section 3.4 goes to this person.

Vehicle (11) and Driver (12). The vehicle of the contract, and its driver now (read only, it comes from the vehicle).

Activation Cost (13). The cost to start the contract. We wrote $60.00.

Date (14). The date when the cost was executed.

Recurring Cost (15). The amount and how often it comes back: No, Daily, Weekly, Monthly or Yearly. We wrote $60.00, Monthly.

Under the costs, the box Terms and Conditions holds the other conditions of the contract in free text. The company is shown in the information block.

What the Contract Does for the Costs

The recurring cost is what feeds the report of the costs (section 6.1). Here the report shows $60.00 for each month from January to November for the Transit contract, which is eleven times its monthly cost, since it began in January. After the second contract is added (section 3.4, $350.00 monthly from June), each month from June to November shows $410.00. The scheduled action Fleet: Generate contracts costs based on costs frequency manages only the state and the alerts of the contracts (section 3.4). The report counts the months from the contract itself.

Alerts and Expiry

The same scheduled action manages the end of the contracts, every day.

For a Running contract that ends in less than the number of days of the setting (30 by default, section 1.1) and that has a Responsible, Odoo plans an activity Contract to Renew for that person, due on the expiration date.

A contract whose expiration date has passed becomes Expired, unless it is Done or Closed.

The vehicle shows the icons in the columns Has Contracts to renew and Has Contracts Overdue of the list, and the filter Need Action shows these vehicles. Mark an expired contract as Done, and the alert stops.

Take a second contract, Zoe Leasing, for the Zoe FUR-2002: Responsible Administrator, vendor Liam Foster, $350.00 monthly, ending on Nov 25 (in 13 days). When the scheduled action runs, Odoo plans the activity Contract to Renew for the Administrator, due Nov 25, and it shows in the chatter of the contract (Due in 13 days). The vehicle turned orange in the list (section 2.1).

odoo Development

Then we changed the expiration date to Nov 1. When we saved, the state became Expired at once, without waiting for the scheduled action. The chatter wrote Running to Expired, the activity showed 11 days overdue, and the buttons were Mark as Done and Close.

odoo Development

We clicked Mark as Done. The state became Done, the activity disappeared, and the only button left is Reactivate.

odoo Development
WhatsApp