[FIX]fix button in vehicle edition to point to log

bzr revid: csn@openerp.com-20120925151450-y898trkc4bkb7b00
This commit is contained in:
Cedric Snauwaert 2012-09-25 17:14:50 +02:00
parent 87a949c8ba
commit ab1044c0ff
1 changed files with 14 additions and 9 deletions

View File

@ -74,17 +74,22 @@ class fleet_vehicle(osv.Model):
""" This opens log view to view and add new log for this vehicle
@return:
"""
print 'HELLO YOU--------------------------------------------'
#print 'HELLO YOU--------------------------------------------'
#print ids[0]
#vehicle = self.browse(cr, uid, ids[0], context)
#logids = self.browse(cr,uid,log_ids,context)
#print vehicle
#print vehicle.name
#print vehicle.registration
#print logids
#print logids.type
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'fleet','fleet_vehicle_log_act', context)
return res
#res['context'] = {
# 'default_partner_ids': applicant.partner_id and [applicant.partner_id.id] or False,
# 'default_user_id': uid,
# 'default_state': 'open',
# 'default_name': applicant.name,
# 'default_categ_ids': category and [category.id] or False,
#}
#return res
#res['context'] = {
# 'default_type': 'log',
#}
return res
_name = 'fleet.vehicle'
_description = 'Fleet Vehicle'