Comment 10 for bug 941428

Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello Mykola Lys (job-mlys) ,

I have checked you patch with trunk. But I have found another
problem. I got a traceback when open a messages after apply a patch.

Traceback (most recent call last):
  File "/home/jir/workspace/trunk6/server/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/jir/workspace/trunk6/server/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/jir/workspace/trunk6/server/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/jir/workspace/trunk6/server/openerp/osv/orm.py", line 2201, in search_count
    res = self.search(cr, user, args, context=context, count=True)
  File "/home/jir/workspace/trunk6/server/openerp/osv/orm.py", line 2248, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/home/jir/workspace/trunk6/server/openerp/addons/base/ir/ir_attachment.py", line 79, in _search
    model_attachments.setdefault(target_dict['res_model'],{}).setdefault(target_dict['res_id'],set()).add(target_dict['id'])
TypeError: string indices must be integers, not str

Steps to produce.
---------------------------
1) Set Outgoing server.
2) Set Email template with attached a report ,
      Give a report name.
3) Create sale Order , Click send button
4) Open Messages.
      -> Trackback.