odoo/openerp/osv
Raphael Collet c28a28e69e [IMP] osv: use iteration for expression negating
The current code when applying negative operator on an expression used
recursion which in extreme case is not best friend with python.

e.g: on instance with a lot of wharehouse, some simple action could lead
to a domain with lot of elements which could easiliy go over the python
maximum recursion limit.

This commit fixes this by replacing recursion with iteration.

We have a stack of negation flags and loop on each token of the domain
as follow :

- when we iterate on a leaf, it consumes the top negation flag,

- after a '!' operator, the top token negation is inversed,

- after an '&' or '|' operator, the top negation flag is duplicated on
  the top of the stack.

closes #9433
opw-653802
2015-11-05 17:13:28 +01:00
..
__init__.py API docs: settings file and titles at modules 2011-06-23 12:03:57 +03:00
expression.py [IMP] osv: use iteration for expression negating 2015-11-05 17:13:28 +01:00
fields.py [FIX] fields: error if there is no value when convert a many2many relation 2015-06-24 16:52:05 +02:00
orm.py [FIX] orm: always save boolean function fields, even when they are false 2015-10-12 16:38:17 +02:00
osv.py [IMP] osv: display full traceback in terminal (not client side) when a check fails instead of minimal error 2014-01-08 15:05:54 +01:00
query.py [REM] unnecessary parens 2012-12-14 13:38:03 +01:00