← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 708603] Re: Traceback occurs at the time of "Account" duplication.

 

Thanks to Jay's careful review, we noticed that the fix suggested in previous comments and already merged, is on fact only hiding an underlying bug in the framework, which causes an invalid update of the parent_left/right column values after the duplication. 
This can have much dire consequences, so it is better to prevent duplication until the server issue is fixed.
As a result, the patch in addons-trunk was reverted by revision 4404 odo@xxxxxxxxxxx-20110203222026-ln6hmyivaj9bo11g.

-- 
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/708603

Title:
  Miscalculation of parent_store data when moving multiple records under
  same parent

Status in OpenERP Server:
  Confirmed

Bug description:
  
  When i duplicate a account to ctrl+shift+d i found this traceback on server side.

  [2011-01-27 17:40:25,970][db_trunk_inv] ERROR:web-services:Uncaught exception
  Traceback (most recent call last):
    File "/home/tiny/workspace/openobject-server/bin/osv/osv.py", line 122, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/tiny/workspace/openobject-server/bin/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/tiny/workspace/openobject-server/bin/osv/osv.py", line 167, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/tiny/workspace/openobject-addons/account/account.py", line 495, in copy
      child_ids = self.copy(cr, uid, child.id, default, context=context, done_list=done_list, local=True)
    File "/home/tiny/workspace/openobject-addons/account/account.py", line 495, in copy
      child_ids = self.copy(cr, uid, child.id, default, context=context, done_list=done_list, local=True)
    File "/home/tiny/workspace/openobject-addons/account/account.py", line 501, in copy
      return super(account_account, self).copy(cr, uid, id, default, context=context)
    File "/home/tiny/workspace/openobject-server/bin/osv/orm.py", line 4145, in copy
      data = self.copy_data(cr, uid, id, default, context)
    File "/home/tiny/workspace/openobject-server/bin/osv/orm.py", line 4031, in copy_data
      data = self.read(cr, uid, [id,], context=context_wo_lang)
    File "/home/tiny/workspace/openobject-server/bin/osv/orm.py", line 2921, in read
      result = self._read_flat(cr, user, select, fields, context, load)
    File "/home/tiny/workspace/openobject-server/bin/osv/orm.py", line 3032, in _read_flat
      res2 = self._columns[val[0]].get(cr, self, ids, val, user, context=context, values=res)
    File "/home/tiny/workspace/openobject-server/bin/osv/fields.py", line 793, in get
      res = self._fnct(obj, cr, user, ids, name, self._arg, context)
    File "/home/tiny/workspace/openobject-addons/account/account.py", line 305, in __compute
      sums[current.id][fn] += sums[child.id][fn]

  It took more number of digits then actual in account code.

  Thanks





References