Server crash when copying one2many function field

Bug #1321675 reported by Ronald Portier (Therp)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned
OpenERP Community Backports (Server)
Status tracked in 7.0
7.0
New
Medium
Unassigned

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/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/osv.py", 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/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/osv.py", 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/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/openeyedev/var/projects/oe_bisdom_breda_70/addons/account/account_invoice.py", 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/res_partner.py", 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/orm.py", line 5125, in copy
    self.copy_translations(cr, uid, id, new_id, context)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/orm.py", line 5069, in copy_translations
    old_children = sorted(r.id for r in old_record[field_name])
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/orm.py", line 474, in __getitem__
    context=self._context)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/orm.py", line 305, in __init__
    super(browse_record_list, self).__init__(lst)
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/orm.py", line 473, in <genexpr>
    for id in result_line[field_name]),
  File "/home/openeyedev/bzr/oe70/ocb-server/7.0/openerp/osv/orm.py", 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 - http://www.akretion.com (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 : https://bugs.launchpad.net/openobject-server/+bug/705364
Maybe it can help you.

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

Sébastien,

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.