Commit Graph

134 Commits

Author SHA1 Message Date
Olivier Dony c6370622e5 [FIX] orm: quote column names in queries to respect case and be consistent
Quoting column names make the case-sensitive in PostgreSQL,
and this is the default strategy we are using so far. It is
important to be consistent there.
We might want to do the same to table names too.
This allows create fields with mixed cases names for example.

bzr revid: odo@openerp.com-20110919201845-heer0rttcouvtc9x
2011-09-19 22:18:45 +02:00
Vo Minh Thu ddd65ab5c1 [REF] osv: removed orm_memory, adapted the distinguished bits to osv_memory,
so yes, there are still two user-visible classes instead of a boolean flag.

bzr revid: vmt@openerp.com-20110812124128-43rr422swy6h2vs8
2011-08-12 14:41:28 +02:00
Vo Minh Thu 6251434cb9 [IMP] unaccent: support for the postgres unaccent contrib module.
OpenERP is now able to use the SQL unaccent() function when available,
and when the server is run with the --unaccent flag.

bzr revid: vmt@openerp.com-20110811110118-cyx2l6c3wk58083p
2011-08-11 13:01:18 +02:00
Vo Minh Thu d462db158e [REF] expression: comments, minor changes.
bzr revid: vmt@openerp.com-20110811093136-8whjybyvf3kf3t4y
2011-08-11 11:31:36 +02:00
Vo Minh Thu 5de1e1a367 [IMP] expression: some more tests pass with the correct semantic.
bzr revid: vmt@openerp.com-20110810143838-l5ujglk5w85mchv1
2011-08-10 16:38:38 +02:00
Vo Minh Thu 19a21de5e1 [FIX] expression: better semantic for in/not in w.r.t. null values:
In SQL, not in (2, 7, 9) will return only non-null records.
In OpenERP, a domain with not in [2, 7, 9] should return
every record whose value is not 2 or 7 or 9, including
the one with a null value.
This means that the union of (not in XXX) and (in XXX)
will return the whole set.

bzr revid: vmt@openerp.com-20110810130646-2y822a276igz2f1g
2011-08-10 15:06:46 +02:00
Vo Minh Thu 784a2d6add [REF] expression: normalize the operator w.r.t. the right operand so that it is done in one place.
bzr revid: vmt@openerp.com-20110810120057-ruijgl9w4zce1teg
2011-08-10 14:00:57 +02:00
Vo Minh Thu c7ccae6feb [REF] expression: unnecessary code in parse() because __leaf_to_sql() is already doing the work.
bzr revid: vmt@openerp.com-20110810102922-xe2oxkgorarco4vm
2011-08-10 12:29:22 +02:00
Vo Minh Thu a32476c6d9 [FIX] expression: the <> can be part of leaves (before normalization).
bzr revid: vmt@openerp.com-20110810092859-mzp9nmo81azxtq8s
2011-08-10 11:28:59 +02:00
Vo Minh Thu 44b3499a73 [FIX] expression: better handling of []/False with in/not in.
The newly added tests were wrong before the fix.
The change might break existing code if it was relying
on this broken behavior.
This also starts a better separation of concern between
parse() and __leaf_to_sql.

bzr revid: vmt@openerp.com-20110810085604-1f6ahwzuzfklj1b7
2011-08-10 10:56:04 +02:00
Vo Minh Thu 64346c63a4 [FIX] expression: perform a check on domain after the <> operator is removed.
bzr revid: vmt@openerp.com-20110810071910-ykz0ji9nz7fqteuj
2011-08-10 09:19:10 +02:00
Vo Minh Thu 187dc4c199 [REF]: expression: simplified <> into != in a pre-step,
put some warnings (which might get boring, we will see).

bzr revid: vmt@openerp.com-20110809174814-4uja94uo2spzcvm5
2011-08-09 19:48:14 +02:00
Vo Minh Thu 2334d4be73 [REF] expression: cleaning.
bzr revid: vmt@openerp.com-20110809154221-550a57hblf4v2foe
2011-08-09 17:42:21 +02:00
Vo Minh Thu 69eb057063 [REF] expression: cosmetic changes.
bzr revid: vmt@openerp.com-20110726184806-j3nejlzo9ez5epb7
2011-07-26 20:48:06 +02:00
Vo Minh Thu 7315181412 [IMP] expression: added a small comment.
bzr revid: vmt@openerp.com-20110726172853-4yoxl1bdnd1sopvf
2011-07-26 19:28:53 +02:00
Vo Minh Thu 1fc22273aa [REF] cosmetic change.
bzr revid: vmt@openerp.com-20110726172458-tg9pxfr29suhczgt
2011-07-26 19:24:58 +02:00
Vo Minh Thu 705cbcf213 [IMP] expression: make one more assert pass in expression.py tests.
bzr revid: vmt@openerp.com-20110726152435-41jv1oryjkmiiy07
2011-07-26 17:24:35 +02:00
Vo Minh Thu 53ff3e9a13 [REF] expression: splitted execute_recursive_in() in two:
- it does two unrelated things
- splitting it makes visible that ids2 and operator are no more used in some calls
- _rec_convert now behaves differently but it probably cannot be called with an empty ids arg anyway.

bzr revid: vmt@openerp.com-20110726142244-54ty1gn7jxxz3cwi
2011-07-26 16:22:44 +02:00
Vo Minh Thu 7b8dfa72ed [IMP] expression: added some tests.
bzr revid: vmt@openerp.com-20110726125605-jr1fi2su315nkanz
2011-07-26 14:56:05 +02:00
Vo Minh Thu 5858a06d5d [IMP] expression: some tests, some cleaning, and a fix:
child_of_right_to_ids() had an uninitialized field_obj variable.

bzr revid: vmt@openerp.com-20110725150721-mm4fhnhm17ill29b
2011-07-25 17:07:21 +02:00
Vo Minh Thu a9e89a49b2 [REF] expression: instanciating an expression now "parses" it, moved some methods as functions, introduced some nice globals.
bzr revid: vmt@openerp.com-20110722153649-atojff0vp34076id
2011-07-22 17:36:49 +02:00
P. Christeas 7c8665bb69 [MERGE] docstrings improvements and preparation for api-doc structure
bzr revid: odo@openerp.com-20110701231956-93zu7xtibpo06eqm
2011-07-02 01:19:56 +02:00
P. Christeas cf6e623f7d API docs: settings file and titles at modules
bzr revid: xrg@linux.gr-20110623090357-nazly8vpfnw0iskr
2011-06-23 12:03:57 +03:00
Olivier Dony 60cbf9bf14 [MERGE] sync with trunk
bzr revid: odo@openerp.com-20110624102631-kiy8j2d1fc7heeco
2011-06-24 12:26:31 +02:00
Vo Minh Thu c68edd3682 [MERGE] expression: all child_of cases can accept the same right operand.
bzr revid: vmt@openerp.com-20110624084311-q8581bjo3p6qji9e
2011-06-24 10:43:11 +02:00
Nimesh (Open ERP) 694693905a add yml test-case for =like and =ilike operator
lp bug: https://launchpad.net/bugs/788106 fixed

bzr revid: nco@tinyerp.com-20110610133658-z4avh4z60moecyde
2011-06-10 19:06:58 +05:30
Naresh (OpenERP) 946730f439 [IMP]:naming convention and added test for id,ids
bzr revid: nch@tinyerp.com-20110608052603-ya0u4ep0yt4h13jy
2011-06-08 10:56:03 +05:30
Yogesh (OpenERP) 2a9a5e2a0e Improve code.
bzr revid: ysa@tinyerp.com-20110603101217-v69rcqtpcfics925
2011-06-03 15:42:17 +05:30
Yogesh (OpenERP) 9cb3205a64 [FIX] fix problem of search multiple conditions O2M with active=False then not work.
lp bug: https://launchpad.net/bugs/711919 fixed

bzr revid: ysa@tinyerp.com-20110603095526-s26wgkahwc1d6zfd
2011-06-03 15:25:26 +05:30
Olivier Dony e10e8073db [IMP] ir.rule,expression: merged improved rule computation mechanism, suggested by RCO
bzr revid: odo@openerp.com-20110531144318-vut0opufvqd5mu07
2011-05-31 16:43:18 +02:00
Naresh (OpenERP) fe474b6d45 [FIX,REF]:does not support hierarchy:M2O,O2M,M2M also refactored the code
bzr revid: nch@tinyerp.com-20110526092853-h9x0z5qnc73n1qc6
2011-05-26 14:58:53 +05:30
Naresh (OpenERP) 58f5dfe47c [FIX]:filtering does not support hierarchy
lp bug: https://launchpad.net/bugs/740799 fixed

bzr revid: nch@tinyerp.com-20110518124150-otgbcv1lw2bqakro
2011-05-18 18:11:50 +05:30
Olivier Dony 444df6affa [FIX] ir.rule,expression: domain expressions must be normalized before they can be safely combined
This adds a normalize_domain() method to osv.expression, which ir.rule calls
before combining expressions due to multiple rules or groups being applicable
to a certain user.
YAML tests are also added with a trivial unit test of normalize_domain() and
some additional tests for ir_rule in order to verify that unnormalized domains
are properly normalized before being combined by ir.rule.

bzr revid: odo@openerp.com-20110324111757-uwuoqvm3lxkipr08
2011-03-24 12:17:57 +01:00
Vo Minh Thu f8572e5c60 [IMP] openerp python module.
- Some logging code moved from netsvc.py to loglevels.py
- Changed imports to use the new openerp module
- config and netsvc initialization calls move to openerp-server.py
- Moved openerp-server.py outside the old bin directory
- Some imports in tools moved inside the methods to break mutual-dependencies

bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
2011-02-07 13:57:23 +01:00