error opening account list

Bug #605639 reported by Ferdinand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Traceback (most recent call last):
File "/home/terp/OpenERP/branch/server/5.0/bin/osv/osv.py", line 58, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/terp/OpenERP/branch/server/5.0/bin/osv/osv.py", line 119, in execute
res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/terp/OpenERP/branch/server/5.0/bin/osv/osv.py", line 111, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/terp/OpenERP/branch/server/5.0/bin/addons/koo.zip/koo/koo.py", line 353, in new_fields_view_get
result = old_fields_view_get( self, cr, user, view_id, view_type, context, toolbar )
File "/home/terp/OpenERP/branch/server/5.0/bin/osv/orm.py", line 1393, in fields_view_get
context)
File "/home/terp/OpenERP/branch/server/5.0/bin/addons/base/ir/ir_values.py", line 225, in get
res = filter(bool, map(lambda x: _result_get(x, keys), list(result)))
File "/home/terp/OpenERP/branch/server/5.0/bin/addons/base/ir/ir_values.py", line 225, in <lambda>
res = filter(bool, map(lambda x: _result_get(x, keys), list(result)))
File "/home/terp/OpenERP/branch/server/5.0/bin/addons/base/ir/ir_values.py", line 211, in _result_get
datas = self.pool.get(model).read(cr, uid, [id], fields, context)
File "/home/terp/OpenERP/branch/server/5.0/bin/addons/hr/hr_department.py", line 75, in read
context=context, load=load)
File "/home/terp/OpenERP/branch/server/5.0/bin/osv/orm.py", line 2228, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "/home/terp/OpenERP/branch/server/5.0/bin/osv/orm.py", line 2368, in _read_flat
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
File "/home/terp/OpenERP/branch/server/5.0/bin/osv/fields.py", line 440, in get
res[r[self._fields_id]].append(r['id'])
KeyError: 1244

So I added in osv/fields.py

        for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
            try:
                res[r[self._fields_id]].append(r['id'])
            except:
                print >> sys.stderr, '********************** BEGINN ********************************'
                print >> sys.stderr, 'context' , context
                print >> sys.stderr, 'values ' , values
                print >> sys.stderr, 'obj ' , self._obj
                print >> sys.stderr, 'ids2 ' , ids2
                print >> sys.stderr, 'r' ,r
                print >> sys.stderr, 'self._fields_id' ,r[self._fields_id]
                print >> sys.stderr, 'r app ', r['id']
                print >> sys.stderr, '********************** END ********************************'
                res[r[self._fields_id]].append(r['id'])
        return res

********************** BEGINN ********************************
context {'lang': u'en_US', 'active_ids': [178], 'tz': u'Europe/Vienna', 'active_id': 178}
values {}
obj ir.actions.act_window.view
ids2 [326, 344, 336, 338, 340, 342, 1, 100, 102, 222, 104, 44, 106, 243, 50, 53, 56, 60, 189, 209, 217, 211, 236, 364, 192, 195, 198, 201, 230, 98, 247, 249, 251, 253, 255, 257, 313, 311, 315, 318, 259, 261, 263, 265, 287, 267, 269, 271, 273, 289, 291, 293, 275, 277, 279, 281, 283, 285, 295, 297, 299, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 219, 35, 38, 41, 47, 301, 328, 330, 332, 334, 284, 14, 254, 335, 256, 16, 258, 39, 314, 18, 312, 59, 280, 190, 282, 210, 241, 218, 252, 212, 220, 237, 294, 365, 193, 296, 196, 329, 199, 298, 202, 36, 231, 300, 99, 248, 250, 316, 20, 319, 331, 260, 22, 262, 42, 264, 24, 266, 286, 288, 26, 268, 327, 343, 345, 270, 337, 28, 339, 272, 341, 48, 274, 2, 30, 101, 290, 103, 333, 223, 292, 105, 32, 45, 302, 107, 276, 244, 34, 51, 278, 54, 57, 61, 37, 43, 191, 52, 49, 221, 55, 46, 58, 194, 200, 40, 197, 6, 7, 9, 3, 11, 12, 10, 4, 5, 8, 358, 359]
r {'act_window_id': 1244, 'id': 326}
self._fields_id 1244
r app 326
********************** END ********************************

BTW if I comment the last
 res[r[self._fields_id]].append(r['id'])
everything works fine

This happens in 2 out of 3 databases installed on the same server

I even tried to remove some act_window entries causing this error, but there are more and more..

what's going on here?

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Dr. Ferdinand,

This is not normal,this can happen when user has deleted some records and there is still a reference counted.
I am closing this bug. If ithappens again ,tell us the exact information,we will sort it out.

Thanks.

Changed in openobject-server:
milestone: none → 5.0.13
status: New → Invalid
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.