[IMP] fleet: add Write Off Date on vehicle

Add the Write Off Date on vehicle.

closes odoo/odoo#77464

Related: odoo/enterprise#21299
Related: odoo/upgrade#2878
Taskid: 2657561
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
Kevin Baptiste
2021-10-19 07:12:04 +00:00
parent 087bbf826f
commit c715ecb38b
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -61,6 +61,7 @@ class FleetVehicle(models.Model):
next_assignation_date = fields.Date('Assignment Date', help='This is the date at which the car will be available, if not set it means available instantly')
acquisition_date = fields.Date('Immatriculation Date', required=False,
default=fields.Date.today, help='Date when the vehicle has been immatriculated')
write_off_date = fields.Date('Cancellation Date', tracking=True, help="Date when the vehicle's license plate has been cancelled/removed.")
first_contract_date = fields.Date(string="First Contract Date", default=fields.Date.today)
color = fields.Char(help='Color of the vehicle', compute='_compute_model_fields', store=True, readonly=False)
state_id = fields.Many2one('fleet.vehicle.state', 'State',
@@ -76,6 +76,7 @@
</group>
<group string="Vehicle">
<field name="acquisition_date" attrs="{'invisible': [('vehicle_type', '!=', 'car')]}"/>
<field name="write_off_date" attrs="{'invisible': [('vehicle_type', '!=', 'car')]}"/>
<field name="vin_sn"/>
<label for="odometer" attrs="{'invisible': [('vehicle_type', '!=', 'car')]}"/>
<div class="o_row" attrs="{'invisible': [('vehicle_type', '!=', 'car')]}">