Server crash when copying one2many function field

Bug #1321675 reported by Ronald Portier (Therp)
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Community Backports (Server)
Status tracked in 7.0

Bug Description

Server crashes when copying the translations of a record that contains a - not stored - one2many function field.

These fields should not have translations copied.

Traceback (most recent call last):
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/service/", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/openeyedev/var/projects/oe_bisdom_breda_70/addons/account/", line 1821, in copy
    return super(res_partner, self).copy(cr, uid, id, default, context)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/addons/base/res/", line 341, in copy
    return super(res_partner, self).copy(cr, uid, id, default, context)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 5125, in copy
    self.copy_translations(cr, uid, id, new_id, context)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 5069, in copy_translations
    old_children = sorted( for r in old_record[field_name])
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 474, in __getitem__
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 305, in __init__
    super(browse_record_list, self).__init__(lst)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 473, in <genexpr>
    for id in result_line[field_name]),
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/", line 354, in __init__
    if id not in self._data:
TypeError: unhashable type: 'dict'

Related branches

Changed in ocb-server:
importance: Undecided → Medium
Revision history for this message
Sébastien BEAU - (sebastien.beau) wrote :

Hi Ronald
I did get the time to take a look to your problem but it remind me an old one under 5 version :
Maybe it can help you.

Revision history for this message
Ronald Portier (Therp) (rportier1962) wrote :


I had seen the bug report you are referring to, but supposedly that bug was fixed.

Also it was not completely the same, as that bug caused an explosions of translations, while the bug I encountered would cause an exception and thereby prevent the copy completely.

Kind regards,

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.