diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index eaebbf9398a..a8d0370408e 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -406,11 +406,13 @@ class fleet_vehicle(osv.Model): return dict([]) reads = self.browse(cr,uid,ids,context=context) res=[] - for record in reads: - ids = self.pool.get('fleet.vehicle.log.contract').search(cr,uid,[('vehicle_id','=',record.id),('state','=','open')],limit=1,order='expiration_date asc') - if len(ids) > 0: - res.append((record.id,self.pool.get('fleet.vehicle.log.contract').browse(cr,uid,ids[0],context=context).cost_type.name)) + if (record.log_contracts): + ids = self.pool.get('fleet.vehicle.log.contract').search(cr,uid,[('vehicle_id','=',record.id),('state','=','open')],limit=1,order='expiration_date asc') + if len(ids) > 0: + res.append((record.id,self.pool.get('fleet.vehicle.log.contract').browse(cr,uid,ids[0],context=context).cost_type.name)) + else: + res.append((record.id,'')) return dict(res) def get_total_contract_reminder(self,cr,uid,ids,prop,unknow_none,context=None): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 9a450c0c2d7..462c201c7ff 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -335,51 +335,95 @@ - - + + Services Logs + fleet.vehicle.log.services + fleet.vehicle + form + tree,form + +

+ Click to create a new service entry. +

+ OpenERP helps you keeping track of all the services done + on your vehicle. Services can be of many type, occasional + repair, fixed maintenance, etc. +

+
+
- + + Fuel Logs + fleet.vehicle.log.fuel + fleet.vehicle + form + tree,form,graph + +

+ Click to create a new fuel log. +

+ Here you can add refuelling entries for all vehicles. + You can also show the log for a particular vehicle using + the search field. +

+
+
- + + Contract + fleet.vehicle.log.contract + fleet.vehicle + form + tree,form + +

+ Click to create a new contract. +

+ OpenERP helps you managing all the contracts for your + vehicle, leasing, insurance, or any other type of contract. +

+ The contract form includes all sort of details, like the + activation cost, recurrent cost, the services included in + the contract, beginning and possibly ending date, etc. +

+
+
- + + Costs + fleet.vehicle.cost + fleet.vehicle + form + tree,form,graph + {"search_default_parent_false" : True} + +

+ Click to create a new cost. +

+ OpenERP helps you managing the costs for your different vehicles + Costs are generally created from services and contract and appears here. +

+ Thanks to the different filters, OpenERP can only print the effective + costs, sort them by type and by vehicle. +

+
+
+ + + Odometer + fleet.vehicle.odometer + fleet.vehicle + form + tree,form,graph + +

+ Here you can add various odometer entries for all vehicles. + You can also show odometer value for a particular vehicle using + the search field. +

+
+
@@ -391,10 +435,12 @@

Click to create a new vehicle.

- Here you can create and add new vehicles to your fleet. - You can associate a driver, add tags, contracts, services - and other informations to a vehicle. You can also sort - them by brand, plate number, driver, location, tags, status. + OpenERP will help you manage your fleet by keeping + track of the contracts, services, costs, fuel logs associated + to a particular vehicle. +

+ When a contract arrives near expiration date, a visual warning + will show you that you need to renew that particular contract.

@@ -530,10 +576,12 @@

Click to create a new contract.

- Here you can create new contracts and show all existing - contracts. Contracts can be of various type, from insurance - contracts to leasing contracts. Each contract is associated - to an existing vehicle and can also be associated to a user. + OpenERP helps you managing all the contracts for your + vehicle, leasing, insurance, or any other type of contract. +

+ The contract form includes all sort of details, like the + activation cost, recurrent cost, the services included in + the contract, beginning and possibly ending date, etc.

@@ -787,12 +835,11 @@ tree,form,graph

- Click to create a new service log entry. + Click to create a new service entry.

- Here you can create new services entries and show all past and - future services. A service can be an occasional repair on a - vehicle or a fixed maintenance. A service is associated to - an existing vehicle. + OpenERP helps you keeping track of all the services done + on your vehicle. Services can be of many type, occasional + repair, fixed maintenance, etc.

@@ -819,10 +866,9 @@

Click to create a new type of service.

- Here you can add new services, each service - belong to a category.
+ Each service belongs to a category.
- contract if this service is used in a contract (ie: leasing, ...).
- - service if it is used as a service (ie: repair, ...).
+ - service if it is used as a service (ie: repair, change tire...).
- both if it is used in both case.

@@ -901,6 +947,17 @@ form tree,form,graph {"search_default_parent_false" : True} + +

+ Click to create a new cost. +

+ OpenERP helps you managing the costs for your different vehicles + Costs are generally created from services and contract and appears here. +

+ Thanks to the different filters, OpenERP can only print the effective + costs, sort them by type and by vehicle. +

+