From a71ed635f3d9a3fb85f7f52a7235a87fd3cdc895 Mon Sep 17 00:00:00 2001 From: "ajay javiya (OpenERP)" Date: Mon, 18 Mar 2013 16:12:28 +0530 Subject: [PATCH] [IMP]:Fleet Management bzr revid: aja@tinyerp.com-20130318104228-yti1y8hri248ppy3 --- addons/fleet/fleet.py | 4 ++-- addons/fleet/fleet_view.xml | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index dc2aabb54fc..28fb7449277 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -77,7 +77,7 @@ class fleet_vehicle_cost(osv.Model): 'name': fields.function(_cost_name_get_fnc, type="char", string='Name', store=True), 'vehicle_id': fields.many2one('fleet.vehicle', 'Vehicle', required=True, help='Vehicle concerned by this log'), 'cost_subtype_id': fields.many2one('fleet.service.type', 'Type', help='Cost type purchased with this cost'), - 'amount': fields.float('Total Price'), + 'amount': fields.float('Total Price', help="Cost that is paid only once at the creation of the contract"), 'cost_type': fields.selection([('contract', 'Contract'), ('services','Services'), ('fuel','Fuel'), ('other','Other')], 'Category of the cost', help='For internal purpose only', required=True), 'parent_id': fields.many2one('fleet.vehicle.cost', 'Parent', help='Parent cost to this current cost'), 'cost_ids': fields.one2many('fleet.vehicle.cost', 'parent_id', 'Included Services'), @@ -394,7 +394,7 @@ class fleet_vehicle(osv.Model): def create(self, cr, uid, data, context=None): vehicle_id = super(fleet_vehicle, self).create(cr, uid, data, context=context) vehicle = self.browse(cr, uid, vehicle_id, context=context) - self.message_post(cr, uid, [vehicle_id], body=_('Vehicle %s has been added to the fleet!') % (vehicle.license_plate), context=context) + self.message_post(cr, uid, [vehicle_id], body=_('%s %s has been added to the fleet!') % (vehicle.model_id.name,vehicle.license_plate), context=context) return vehicle_id def write(self, cr, uid, ids, vals, context=None): diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 4d0e6298129..820858ef146 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -242,11 +242,17 @@ - + +