← Back to team overview

openerp-india team mailing list archive

[Bug 1131653] [NEW] [7.0] _check_recursion signals non-existing recursion when ids include a parent/child pair

 

Public bug reported:

Here is my company parent structure:

    (Pdb) self.read(cr, uid, [3, 4], ['parent_id'])
    [{'id': 3, 'parent_id': False},
     {'id': 4, 'parent_id': (3, u'Acme 3')}]

That is to say, record 3 is the parent of record 4. Record 3 does not
have a parent itself.

When I write the same value to all records, the constraint on
_check_recursion signals a recursive structure incorrectly:

    (Pdb) self.check_recursion(cr, uid, [3, 4], context=None, parent=None)
    False

Having each record checked individually, the method gives the right
results.

    (Pdb) self._check_recursion(cr, uid, [3], context=None, parent=None)
    True
    (Pdb) self.check_recursion(cr, uid, [4], context=None, parent=None)
    True

These results are inconsistent and as a result I cannot write the same
field on these records simultaneously.

** Affects: openobject-server
     Importance: Undecided
         Status: New

** Project changed: openobject-addons => openobject-server

** Summary changed:

- [7.0] _check_recursion signals non-existing recursion
+ [7.0] _check_recursion signals non-existing recursion when ids include a parent/child pair

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1131653

Title:
  [7.0] _check_recursion signals non-existing recursion when ids include
  a parent/child pair

Status in OpenERP Server:
  New

Bug description:
  Here is my company parent structure:

      (Pdb) self.read(cr, uid, [3, 4], ['parent_id'])
      [{'id': 3, 'parent_id': False},
       {'id': 4, 'parent_id': (3, u'Acme 3')}]

  That is to say, record 3 is the parent of record 4. Record 3 does not
  have a parent itself.

  When I write the same value to all records, the constraint on
  _check_recursion signals a recursive structure incorrectly:

      (Pdb) self.check_recursion(cr, uid, [3, 4], context=None, parent=None)
      False

  Having each record checked individually, the method gives the right
  results.

      (Pdb) self._check_recursion(cr, uid, [3], context=None, parent=None)
      True
      (Pdb) self.check_recursion(cr, uid, [4], context=None, parent=None)
      True

  These results are inconsistent and as a result I cannot write the same
  field on these records simultaneously.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1131653/+subscriptions


Follow ups

References