[FIX] crm: Check if there is a model for the log of the crm.case
bzr revid: stephane@openerp.com-20100511154023-joyuanu159l6bw00
This commit is contained in:
parent
41ef3a09e8
commit
5365ed0efc
|
@ -202,6 +202,11 @@ class crm_send_new_email(osv.osv_memory):
|
|||
res = {}
|
||||
for hist in hist_obj.browse(cr, uid, res_ids):
|
||||
model = hist.log_id.model_id.model
|
||||
|
||||
# In the case where the crm.case does not exist in the database
|
||||
if not model:
|
||||
return {}
|
||||
|
||||
model_pool = self.pool.get(model)
|
||||
case = model_pool.browse(cr, uid, hist.log_id.res_id)
|
||||
if 'email_to' in fields:
|
||||
|
|
Loading…
Reference in New Issue