[6.1] TypeError: unhashable type: 'list' in res_partner.view_header_get()

Bug #939588 reported by Stefan Rijnhart (Opener)
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Expired
Undecided
Unassigned
Therp Backports (Deprecated)
Fix Released
Low
Stefan Rijnhart (Opener)
Server-6.1
Fix Released
Undecided
Unassigned

Bug Description

Hi,

I have created a client_action_relate on res.partner with src_model also set to res.partner. When I click on the action entry on the right hand side action bar of a partner form view, this causes the following error:

  File "/home/oervwncrmdev61/openobject-server/openerp/addons/base/res/res_partner.py", line 286, in view_header_get
    return _('Partners: ')+self.pool.get('res.partner.category').browse(cr, uid, context['category_id'], context).name
  File "/home/oervwncrmdev61/bzr/openobject-server/openerp/osv/orm.py", line 4229, in browse
    return self._list_class([browse_record(cr, uid, id, self, cache, context=context, list_class=self._list_class, fields_process=fields_process) for id in select], context=cont
ext)
  File "/home/oervwncrmdev61/bzr/openobject-server/openerp/osv/orm.py", line 345, in __init__
    if id not in self._data:
TypeError: unhashable type: 'list'

The reason for this is that the custom view_header_get method of res.partner anticipates the 'category_id' key in the context to be a single id, used to inject the category name in the header for the 'Partners per category' view. However, in my case the context contains all the form's field values with 'category_id' having a value in [(6, 0, id)] syntax. The custom method on res.partner should anticipate this possibility (and then ignore the category_id).

Cheers,
Stefan.

Related branches

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

Hello Stefan Rijnhart ,

I have checked this issue at my end with latest trunk.But
I did not face any problem like your,So would you please
more information regarding this issue.

Thanks and waiting for reply!

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenERP Server because there has been no activity for 60 days.]

Changed in openobject-server:
status: Incomplete → Expired
Changed in therp-backports:
milestone: none → 6.1-maintenance
assignee: nobody → Stefan Rijnhart (Therp) (stefan-therp)
importance: Undecided → Low
status: New → Fix Committed
Changed in therp-backports:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.