diff options
| author | Denis Ledoux <dle@odoo.com> | 2014-08-12 14:13:44 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2014-08-12 14:13:44 +0200 |
| commit | 0d22a34fa93ebf39bb4338527e95cd2bbc3f69e0 (patch) | |
| tree | b67211b6c3bcbd7e6c5d46ad493661ba69c435f9 | |
| parent | 245bb4ebdfeccb05134b3ff943c9fd0fb01173c2 (diff) | |
[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
| -rw-r--r-- | addons/portal_claim/portal_claim.py | 2 |
1 files changed, 1 insertions, 1 deletions
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( |
