Infinite recursion when viewing Journal entries

Bug #1199076 reported by mikel on 2013-07-08
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Additional payment, bank statement and voucher addons for OpenERP
Status tracked in 7.0
6.1
Undecided
Unassigned
7.0
Undecided
Unassigned

Bug Description

When a Journal entry has 3 or more partial reconcile entries I get following error:

Client Traceback (most recent call last):
  File "/home/openerp/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/home/openerp/addons/web/controllers/main.py", line 930, in get
    return self.do_get(req, model, ids, fields)
  File "/home/openerp/addons/web/controllers/main.py", line 952, in do_get
    records = Model.read(ids, fields, req.session.eval_context(req.context))
  File "/home/openerp/addons/web/common/openerplib/main.py", line 250, in proxy
    args, kw)
  File "/home/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/home/openerp/addons/web/common/http.py", line 608, in send
    raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)

Server Traceback (most recent call last):
  File "/home/openerp/addons/web/common/http.py", line 593, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 3416, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 3539, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/fields.py", line 1129, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/home/openerp/addons/account_payment_extension/account_move_line.py", line 77, in _invoice
    dict = self._invoice (cursor, user, [line_in2.id], name, arg, context)
  File "/home/openerp/addons/account_payment_extension/account_move_line.py", line 77, in _invoice
    dict = self._invoice (cursor, user, [line_in2.id], name, arg, context)
  File "/home/openerp/addons/account_payment_extension/account_move_line.py", line 77, in _invoice
    dict = self._invoice (cursor, user, [line_in2.id], name, arg, context)
...
...
...
  File "/home/openerp/addons/account_payment_extension/account_move_line.py", line 77, in _invoice
    dict = self._invoice (cursor, user, [line_in2.id], name, arg, context)
  File "/home/openerp/addons/account_payment_extension/account_move_line.py", line 77, in _invoice
    dict = self._invoice (cursor, user, [line_in2.id], name, arg, context)
  File "/home/openerp/addons/account_payment_extension/account_move_line.py", line 65, in _invoice
    for line_in in move.line_id:
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 476, in __getattr__
    return self[name]
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 391, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 3416, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 3539, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/fields.py", line 551, in get
    ids2 = obj.pool.get(self._obj).search(cr, user, self._domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
  File "/home/openerp/addons/account/account_move_line.py", line 701, in search
    return super(account_move_line, self).search(cr, uid, args, offset, limit, order, context, count)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 2245, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 4580, in _search
    self.check_read(cr, access_rights_uid or user)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 3661, in check_read
    return self.check_access_rights(cr, uid, 'read', raise_exception)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/osv/orm.py", line 3655, in check_access_rights
    return self.pool.get('ir.model.access').check(cr, uid, self._name, operation, raise_exception)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/tools/cache.py", line 41, in lookup
    r = d[key]
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/tools/func.py", line 35, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/tools/lru.py", line 38, in __getitem__
    self[a[0]] = a[1]
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/tools/func.py", line 35, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/tools/lru.py", line 44, in __setitem__
    del self[obj]
  File "/usr/local/lib/python2.6/dist-packages/openerp-6.1_1-py2.6.egg/openerp/tools/func.py", line 37, in wrapper
    lock.release()
  File "/usr/lib/python2.6/threading.py", line 147, in release
    self._note("%s.release(): non-final release", self)
RuntimeError: maximum recursion depth exceeded

The problem is in account_payment_extension/account_move_line.py", line 77, it calls same fuction comparing only the current id but if they are 3 or more it can enter in an infinity recursion loop.

Related branches

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers