Commit Graph

30 Commits

Author SHA1 Message Date
Olivier Dony 67dcd97ea6 [FIX] orm,expression: sanity checks for domain terms, cleanup, tests
bzr revid: odo@openerp.com-20110924020303-2amkx95ij1yp8ofk
2011-09-24 04:03:03 +02:00
Vo Minh Thu 0c123711c5 [FIX] It is possible to mention an undeclared column in a domain.
Actually, this seems to be used for the logging columns
which are in database but not necessarily in _columns.
This is ugly and a warning is now issued.

lp bug: https://launchpad.net/bugs/857105 fixed

bzr revid: vmt@openerp.com-20110923101839-ko0s7ekt4dlyvrx2
2011-09-23 12:18:39 +02:00
Olivier Dony 9497814729 [IMP] expression: fix [(o2m,not in,...)] domains, re-enable tests, cleanup
bzr revid: odo@openerp.com-20110922005431-gnym5pormtjkfu8q
2011-09-22 02:54:31 +02:00
Olivier Dony c856d70bf5 [MERGE] sync latest trunk, including fixes for =like/=ilike
bzr revid: odo@openerp.com-20110921225225-zk98p2w1asoi2csl
2011-09-22 00:52:25 +02:00
Olivier Dony 6652943cd2 [IMP] minor cosmetic changes to improve readability and ease reviewing process
bzr revid: odo@openerp.com-20110921224423-h5hjnqrqgrp5hhau
2011-09-22 00:44:23 +02:00
Olivier Dony 886b7407de [FIX] osv.expression: fix =like/=ilike operators, broken by r.3631
Revision 3631 = vmt@openerp.com-20110920124252-l5snbvb7ywfogw1o

bzr revid: odo@openerp.com-20110921224208-mji81to3g4kpmkuq
2011-09-22 00:42:08 +02:00
Olivier Dony 6e4a93cd22 [MERGE] sync w/ latest trunk
bzr revid: odo@openerp.com-20110921162128-22sp59cn4xv983q5
2011-09-21 18:21:28 +02:00
Vo Minh Thu b4582815bc [MERGE] expression: support for =like/=ilike.
lp bug: https://launchpad.net/bugs/788106 fixed

bzr revid: vmt@openerp.com-20110920124252-l5snbvb7ywfogw1o
2011-09-20 14:42:52 +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 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 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 2f09ebf7f4 [IMP] expression: started some new tests.
bzr revid: vmt@openerp.com-20110809151200-q9l2w7imt2uywciq
2011-08-09 17:12:00 +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 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
Olivier Dony 5ad88d5d35 [MERGE] sync with trunk
bzr revid: odo@openerp.com-20110624133457-hu2yihcq1t6in6u0
2011-06-24 15:34:57 +02:00
Vo Minh Thu 9744cb085f [FIX] corrected a test giving warning from the previous merge.
bzr revid: vmt@openerp.com-20110624133216-9mxlte0jydnz74sb
2011-06-24 15:32:16 +02: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) e0b1e6724e remove print statement
lp bug: https://launchpad.net/bugs/788106 fixed

bzr revid: nco@tinyerp.com-20110613070218-3uvgnpefavl95cmv
2011-06-13 12:32:18 +05:30
Nimesh (Open ERP) 6964f67569 improve the yml test-case
lp bug: https://launchpad.net/bugs/788106 fixed

bzr revid: nco@tinyerp.com-20110613065306-g0p5hsw84qa8bvtd
2011-06-13 12:23:06 +05:30
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
Olivier Dony cf09b1df94 [FIX] test_osv_expression: fixed for new normalization API
bzr revid: odo@openerp.com-20110601062303-k9z0birutesfmkhp
2011-06-01 08:23:03 +02:00
Naresh (OpenERP) a6b1964813 [IMP]:added .yml test cases for hierarchical search
bzr revid: nch@tinyerp.com-20110527054751-pcvlts8vu17doyv9
2011-05-27 11:17:51 +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