[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#57251 X-original-commit: 5a031de6c456180b0f447470382e1ae1c7dbd5dc Signed-off-by: Simon Goffin (sig) <sig@openerp.com> Signed-off-by: backspac <backspac@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user