odoo/addons/web/static/src/js
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
..
boot.js [IMP] Include openerpframework in common assets. Add module list in bundle 2014-05-12 17:18:12 +02:00
chrome.js [FIX] web: fix layout issue in Chrome 50 2016-04-18 14:43:50 +02:00
core.js [FIX] web: correctly retrieve exception from @serialize_exception 2015-01-21 17:03:54 +01:00
data.js [IMP] web: remove needless o2m onchange 2015-11-10 12:36:06 +01:00
data_export.js [FIX] web: conserve /id for saved export list 2016-01-28 17:27:18 +01:00
formats.js [FIX] web: Python-like rounding method 2015-11-04 13:14:59 +01:00
openerpframework.js [FIX] web: float seen as changed with digits set to 0 2015-04-03 16:37:28 +02:00
pyeval.js [FIX] web: properly combine domains with "OR" in CompoundDomain 2017-03-24 15:03:54 +01:00
search.js [MERGE] forward port of branch saas-3 up to e552e09 2015-04-30 15:45:03 +02:00
test_support.js [IMP] Removed old JavaScript module loading system in the 'web' addons. Still has some retro-compatibility for other addons. 2013-08-06 14:50:22 +02:00
testing.js [IMP] Convered qunit test suite to template 2014-04-28 20:24:51 +02:00
tour.js [IMP] website: improved tours error message and race conditions 2015-04-29 10:25:20 +02:00
view_form.js [FIX] web: transfer context to underlying many2one in reference field 2016-12-15 09:34:32 +01:00
view_list.js [FIX] web: repair length field in view list 2016-10-24 13:25:58 +02:00
view_list_editable.js [FIX] web: context/domain in move line tree 2016-02-19 13:21:41 +01:00
view_tree.js [CHG] Fix task 7536 / PR #499 differently 2015-01-14 13:28:23 +01:00
views.js [ADD] web: prevent the propagation of context keys containing prefix show_ 2015-06-22 14:06:11 +02:00
watch.js [FIX] Add prototype watch in js object. That will allow to listen change on some library for example. It's used to know if jquery is overrided by an external script. 2014-04-14 16:58:02 +02:00