← Back to team overview

credativ team mailing list archive

[Bug 916380] [NEW] issue with normalize function

 

Public bug reported:

Hi,

I'm testing with openerp server trunk 6.1rc1, rev 3963. 
My code is like this:
===
ids = self.search(cr, uid, ['|', ('from_pty_id',  'in', (1, 2)), '|',  ('to_pty_id', 'in', (3, 4)),  '|',  ('pty_rel_tye_id', 'in', (5, 6))], limit=limit, context=context)
===

I face an assertion as below
===
File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/osv/expression.py", line 184, in normalize
    assert expected == 0
===

I checked this file, and found that the function logic may be cracked
when encountering the above domain arguments. expected variable at the
end of the loop equals 1. This makes the above assertion while the above
search statement is right.

Thanks,

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

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

Title:
  issue with normalize function

Status in OpenERP Server:
  New

Bug description:
  Hi,

  I'm testing with openerp server trunk 6.1rc1, rev 3963. 
  My code is like this:
  ===
  ids = self.search(cr, uid, ['|', ('from_pty_id',  'in', (1, 2)), '|',  ('to_pty_id', 'in', (3, 4)),  '|',  ('pty_rel_tye_id', 'in', (5, 6))], limit=limit, context=context)
  ===

  I face an assertion as below
  ===
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/osv/expression.py", line 184, in normalize
      assert expected == 0
  ===

  I checked this file, and found that the function logic may be cracked
  when encountering the above domain arguments. expected variable at the
  end of the loop equals 1. This makes the above assertion while the
  above search statement is right.

  Thanks,

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


Follow ups

References