odoo/addons/web/static/test
qsm-odoo b2d66d0c14 [FIX] web: properly combine domains with "OR" in CompoundDomain
The CompoundDomain class allows to regroup several domains with an
implicit "AND"; these domains can be either a string, an array or
another CompoundDomain. A CompoundDomain can then be converted to
an array thanks to pyeval.js.
For example, if a CompoundDomain is initialized with `[A, B]` and
`[C]`, the array conversion gave `[A, B, C]` (which is expected).

However, a hackish method was used with CompoundDomain. If one of the
domain of a CompoundDomain is equal to `["|"]` (an array with the
OR operator in it), the two next subdomains were supposed to be joined
by a OR operator. Indeed, for the case of a CompoundDomain initialized
with `["|"]`, `[A]` and `[B]`, the array conversion gave `["|", A, B]`
(which is expected). However, if initialized with `["|"]`, `[A, B]` and
`[C]`, the array conversion gave `["|", A, B, C]` which is very wrong
as what was expected is `["|", "&", A, B, C]`. The problem is that the
given `[A, B]` contains implicit "&" operators.

This commit fixes the problem by normalizing only if the CompoundDomain
starts with a ["|"] or ["!"] array which is the standard odoo case.
This allows to limit breaking custom code (e.g we want a simple "AND"
of `[A]` and `[B]` to stay `[A, B]`, not become `["&", A, B]`).

The commit also modifies a test so that it checks that the problem is
properly solved.
2017-03-24 15:03:54 +01:00
..
fulltest [IMP] jQuery deferred API changes refactoring. Changed 'then's in 'done'/'fail' and 'pipe's in 'then' 2012-10-30 15:06:30 +01:00
data.js [FIX] dataset.read_ids should always return records in the order of the parameter ids 2014-02-25 17:28:13 +01:00
evals.js [FIX] web: properly combine domains with "OR" in CompoundDomain 2017-03-24 15:03:54 +01:00
form.js [IMP] port basic/existing tests to new framework, apart from editor stuff 2012-10-26 11:21:44 +02:00
formats.js [IMP] Moved the date formatting functions in openerpframework.js 2013-08-08 15:45:20 +02:00
framework.js [ADD] JS widgets reference documentation 2014-10-07 10:21:44 +02:00
fulltest.html [FIX] tests: outdated resource paths in manual test files 2015-09-18 15:52:11 +02:00
list-editable.js [Revert] cb30783aba & 6349048ba0 2014-10-03 14:03:12 +02:00
list-utils.js Applied jshint on test files and corrected errors 2013-07-25 13:24:16 +02:00
list.js [FIX] web: read_ids of data.js use method search_read if check_access_rule option is true. 2014-03-27 12:24:56 +01:00
mutex.js [IMP] Merged corelib.js and coresetup.js into core.js 2013-08-06 14:26:23 +02:00
qunit-doc.js
registry.js [IMP] Merged corelib.js and coresetup.js into core.js 2013-08-06 14:26:23 +02:00
rpc-misordered.js Added some tests for jsonrpc 2013-08-01 18:32:21 +02:00
search.js [FIX] web: translation of default M2O values in search bar 2015-04-22 17:53:35 +02:00
testing.js Applied jshint on test files and corrected errors 2013-07-25 13:24:16 +02:00