← Back to team overview

openerp-india team mailing list archive

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

 

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

** Changed in: openobject-server
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/939588

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

Status in OpenERP Server:
  Expired

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/939588/+subscriptions


References