c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #15852
[Bug 716965] Re: After duplicating account then error occured in __compute method on account.account object
*** This bug is a duplicate of bug 708603 ***
https://bugs.launchpad.net/bugs/708603
** This bug has been marked a duplicate of bug 708603
Miscalculation of parent_store data when moving multiple records under same parent
* You can subscribe to bug 708603 by following this link: https://bugs.launchpad.net/openobject-server/+bug/708603/+subscribe
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/716965
Title:
After duplicating account then error occured in __compute method on
account.account object
Status in OpenERP Modules (addons):
New
Bug description:
I'm using v6.0.1 on Ubuntu 10.04
I duplicated an account then getting errors:
File "openerp-server/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "openerp-server/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "openerp-server/addons/audittrail/audittrail.py", line 511, in execute
res = my_fct(db, uid, model, method, *args)
File "openerp-server/addons/audittrail/audittrail.py", line 495, in my_fct
return fct_src(db, uid, model, method, *args)
File "openerp-server/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "openerp-server/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "openerp-server/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "openerp-server/osv/orm.py", line 2921, in read
result = self._read_flat(cr, user, select, fields, context, load)
File "openerp-server/osv/orm.py", line 3032, in _read_flat
res2 = self._columns[val[0]].get(cr, self, ids, val, user, context=context, values=res)
File "openerp-server/osv/fields.py", line 793, in get
res = self._fnct(obj, cr, user, ids, name, self._arg, context)
File "openerp-server/addons/account/account.py", line 306, in __compute
sums[current.id][fn] += sums[child.id][fn]
KeyError: 454
--------------
on account/account.py line 285
children_and_consolidated.reverse()
print 'children_and_consolidated :', children_and_consolidated
OUTPUT:
children_and_consolidated : [435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 322, .
. . .
31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15,
14, 453, 455, 13, 454, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
value 454 is here. But wrong position.
References