Skip to content
Snippets Groups Projects
Commit c5e14bee 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#75532

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent c759b583
Branches
Tags
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.
Please register or to comment