Skip to content
Snippets Groups Projects
Commit 1d20e978 authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] account_fleet: export multiple fleet_vehicle moves


The compute field for fleet_vehicle().account_move_ids can be using
self.id where self might be a recordset with more than one record.

opw-2630226

closes odoo/odoo#75541

X-original-commit: c5e14bee
Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 6cb526fe
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ class FleetVehicle(models.Model):
return
for vehicle in self:
vehicle.account_move_ids = self.env['account.move.line'].search([('vehicle_id', '=', self.id), ('move_id.state', '!=', 'cancel')]).move_id
vehicle.account_move_ids = self.env['account.move.line'].search([('vehicle_id', '=', vehicle.id), ('move_id.state', '!=', 'cancel')]).move_id
vehicle.bill_count = len(vehicle.account_move_ids)
def action_view_bills(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment