From b2adcbef028bd82bb549c0fe503eb46893433f3c Mon Sep 17 00:00:00 2001 From: Serpent Consulting Services Date: Mon, 17 Dec 2012 00:50:37 +0530 Subject: [PATCH] [FIX] Fleet : purchaser_id should not be UID, but a partner ID related to that UID lp bug: https://launchpad.net/bugs/1089876 fixed bzr revid: support@serpentcs.com-20121216192037-1kexe37j0omowgvx --- addons/fleet/fleet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py index af0a78b5448..3b0b48a9935 100644 --- a/addons/fleet/fleet.py +++ b/addons/fleet/fleet.py @@ -787,7 +787,7 @@ class fleet_vehicle_log_contract(osv.Model): 'cost_amount': fields.related('cost_id', 'amount', string='Amount', type='float', store=True), #we need to keep this field as a related with store=True because the graph view doesn't support (1) to address fields from inherited table and (2) fields that aren't stored in database } _defaults = { - 'purchaser_id': lambda self, cr, uid, ctx: uid, + 'purchaser_id': lambda self, cr, uid, ctx: self.pool.get('res.users').browse(cr, uid, uid, context=ctx).partner_id.id or False, 'date': fields.date.context_today, 'start_date': fields.date.context_today, 'state':'open',