[FIX] marketing_campaign: avoid exception when resource linked to workitem was deleted

bzr revid: odo@openerp.com-20110312011401-qy5lmffp4owfsxf6
This commit is contained in:
Olivier Dony 2011-03-12 02:14:01 +01:00
parent d5129c1eeb
commit 488200e0c9
1 changed files with 2 additions and 0 deletions

View File

@ -560,6 +560,8 @@ class marketing_campaign_workitem(osv.osv):
continue
proxy = self.pool.get(wi.object_id.model)
if not proxy.exists(cr, uid, [wi.res_id]):
continue
ng = proxy.name_get(cr, uid, [wi.res_id], context=context)
if ng:
res[wi.id] = ng[0][1]