Skip to Content
Menu
This question has been flagged
1 Reply
637 Views

Not sure where to post this but...

Been playing with a testbed of Odoo on Ubuntu 22.04, and so far it's impressive. 

Only one thing stops me - in the "fleet" app, under vehicle types - the only options are car and bike? 

Did I do something wrong or is there a way to add to the vehicle types? This is a trucking company, need to add rigs and trailers. 


Thank you. 

Avatar
Discard
Best Answer

Hi,

In fleet module 2 option is available 'car' and 'Bike'. so need to add 'Truck' in vehicle type.

In py:

_inherit = 'fleet.vehicle.model'

vehicle_type = fields.Selection(selection_add=[('truck', 'Truck'),], ondelete={'truck': 'cascade',})

In xml:

<field name="vehicle_type" position="inside"/>


Regards

Avatar
Discard