Skip to content
Snippets Groups Projects
Commit 24e962b5 authored by nie's avatar nie
Browse files

[FIX] fleet: contract name does not update when changing vehicle name

Steps to reproduce the bug:

- Create vehicle A
- Create a contract for vehicle A
- Change the license plate of vehicle A

Bug:

The name of the contract of vehicle A hasn't changed

opw:2327820

closes odoo/odoo#57244

X-original-commit: 5a031de6c456180b0f447470382e1ae1c7dbd5dc
Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
parent 4214f05d
Branches
Tags
No related merge requests found
......@@ -55,7 +55,7 @@ class FleetVehicleLogContract(models.Model):
], 'Recurring Cost Frequency', default='monthly', help='Frequency of the recuring cost', required=True)
service_ids = fields.Many2many('fleet.service.type', string="Included Services")
@api.depends('vehicle_id', 'cost_subtype_id')
@api.depends('vehicle_id.name', 'cost_subtype_id')
def _compute_contract_name(self):
for record in self:
name = record.vehicle_id.name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment