diff options
| author | nie <nie@odoo.com> | 2020-09-07 09:00:15 +0000 |
|---|---|---|
| committer | nie <nie@odoo.com> | 2020-09-08 10:59:15 +0000 |
| commit | 24e962b5164917643bfc9be575b5f2417d44ddb3 (patch) | |
| tree | adc1ba1c088bb442ce59a56d5b8e3830075cf9d8 /addons/fleet | |
| parent | 4214f05d454bca2b60fda3a288d529c098e84f77 (diff) | |
[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: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
Diffstat (limited to 'addons/fleet')
| -rw-r--r-- | addons/fleet/models/fleet_vehicle_cost.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/fleet/models/fleet_vehicle_cost.py b/addons/fleet/models/fleet_vehicle_cost.py index d6e5c96453b..b91159c0d29 100644 --- a/addons/fleet/models/fleet_vehicle_cost.py +++ b/addons/fleet/models/fleet_vehicle_cost.py @@ -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 |
