From 0d22a34fa93ebf39bb4338527e95cd2bbc3f69e0 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 12 Aug 2014 14:13:44 +0200 Subject: [PATCH] [FIX] portal_claim: create claim with no partner_id If partner_id is False, do not try to name_get This fix is related to the rev 095be21ab17f7f731877d61c99b48b51119ff39a --- addons/portal_claim/portal_claim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/portal_claim/portal_claim.py b/addons/portal_claim/portal_claim.py index d7c9c1af6ca..7eb30888d2a 100644 --- a/addons/portal_claim/portal_claim.py +++ b/addons/portal_claim/portal_claim.py @@ -29,7 +29,7 @@ class crm_claim(base_stage, osv.osv): def default_get(self, cr, uid, fields, context=None): res = super(crm_claim, self).default_get(cr, uid, fields, context=context) - if isinstance(res.get('partner_id'), (int, long)): + if type(res.get('partner_id')) in (int, long): # Special case for portal users, as they are not allowed to call name_get on res.partner # We save this call for the web client by returning it in default get res['partner_id'] = self.pool['res.partner'].name_get(