Commit Graph

55 Commits

Author SHA1 Message Date
Vo Minh Thu f22f2fc770 [IMP] openerp.{modules,osv}: _logger with fully qualified module name.
bzr revid: vmt@openerp.com-20120124124252-91g3ysf33zsq4nhd
2012-01-24 13:42:52 +01:00
Olivier Dony c68045e497 [FIX] expression: properly care for implicitly defined m2m fields used in search() domains
Now that m2m fields may be defined without explicitly
specifying the name of the relationship table and its
foreign key columns, all access to these internal
names should be done via m2m._sql_names().
This seems better than lazily initializing these
internal names and hoping that nothing accesses
them before the init.

bzr revid: odo@openerp.com-20120119151012-c38k5zl7rqherhth
2012-01-19 16:10:12 +01:00
Vo Minh Thu b00473034a [IMP] typo.
bzr revid: vmt@openerp.com-20111109123042-9vtfp6uv7qsgy4pz
2011-11-09 13:30:42 +01:00
Olivier Dony 4140e3546a [FIX] expression: proper handling of empty string in m2o domain criterions
Also fixed incorrect name_search() implementations in
res.partner and res.currency, and added corresponding
tests.

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

bzr revid: odo@openerp.com-20111011163435-szj9vm6x9x8nryn8
2011-10-11 18:34:35 +02:00
Vo Minh Thu 25a883b2aa [FIX] expression: we dont add any restriction on the main ids
as the possible active=True/False is already present in the main domain.

bzr revid: vmt@openerp.com-20111005133337-p8nvv26tlii7x253
2011-10-05 15:33:37 +02:00
Yogesh (OpenERP) 07121a762b [MERGE]
bzr revid: ysa@tinyerp.com-20111005093709-u3rg6g10rcs7tf8f
2011-10-05 15:07:09 +05:30
Yogesh (OpenERP) 2fe1e8c0d8 [MERGE]
bzr revid: ysa@tinyerp.com-20111005093516-u8v7e58ndsyuxh9u
2011-10-05 15:05:16 +05:30
Yogesh (OpenERP) 36b97bc3d7 [MERGE] Merge wtih trunk server upto revision no 3722.
bzr revid: ysa@tinyerp.com-20111005091223-uznjimebpwh0r6a4
2011-10-05 14:42:23 +05:30
Olivier Dony 1bf74fa77e [MERGE] no-op merge of trunk, discarding osv-memory fix, obsolete already
bzr revid: odo@openerp.com-20110924022846-p08bawfxh5lym37u
bzr revid: odo@openerp.com-20110924025346-1khpike23e2honll
2011-09-24 04:53:46 +02:00
Olivier Dony dfccbaf28b [FIX] orm,expression: special-case previous commit for osv_memory
This will soon be obsolete and deleted, as soon
as osv_memory will be removed and merged inside
normal osv.

bzr revid: odo@openerp.com-20110924024928-awgncvhcyfkmnak5
2011-09-24 04:49:28 +02:00
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 7d4cdb69f2 [IMP] orm: minor cleanup: avoid duplicate functions to do the same thing
bzr revid: odo@openerp.com-20110922172027-7kiae4yd2vuwwk6w
2011-09-22 19:20:27 +02:00
Olivier Dony 0d3085d14f [MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20110922154155-jq811w768d9zfgim
2011-09-22 17:41:55 +02:00
Olivier Dony 1edacff497 [MERGE] unaccent support + domain parsing cleanup/improvements
bzr revid: odo@openerp.com-20110922140856-p8q0ib1lirgv1g02
2011-09-22 16:08:56 +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
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