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
..
2017-03-19 02:55:34 +01:00
2017-01-22 03:25:31 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-02-26 02:55:24 +01:00
2017-01-22 03:25:31 +01:00
2017-03-01 02:54:50 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-02-26 02:55:24 +01:00
2017-02-05 02:54:43 +01:00
2016-10-17 09:39:53 +02:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-01-22 03:25:31 +01:00
2017-02-19 02:54:42 +01:00
2017-03-12 02:54:51 +01:00
2017-01-29 02:55:31 +01:00
2017-03-05 02:55:35 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-01-29 02:55:31 +01:00
2017-03-12 02:54:51 +01:00
2017-02-19 02:54:42 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-01-29 02:55:31 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-02-26 02:55:24 +01:00
2017-01-29 02:55:31 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-01-29 02:55:31 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-02-19 02:54:42 +01:00
2017-02-05 02:54:43 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-02-19 02:54:42 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-01 02:54:50 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-02-26 02:55:24 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-01-22 03:25:31 +01:00
2017-03-19 02:55:34 +01:00
2017-01-22 03:25:31 +01:00
2017-03-12 02:54:51 +01:00
2017-02-26 02:55:24 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-02-19 02:54:42 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-02-05 02:54:43 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2016-11-14 17:11:57 +01:00
2017-03-16 13:37:20 +01:00
2017-03-21 11:50:12 +01:00
2016-11-14 17:11:57 +01:00
2016-11-14 17:11:57 +01:00
2017-03-21 11:50:12 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-01-22 03:25:31 +01:00
2017-02-19 02:54:42 +01:00
2017-01-22 03:25:31 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-05 02:55:35 +01:00
2017-03-05 02:55:35 +01:00
2017-01-22 03:25:31 +01:00
2017-01-22 03:25:31 +01:00
2017-01-22 03:25:31 +01:00
2017-03-12 02:54:51 +01:00
2017-02-26 02:55:24 +01:00
2017-01-29 02:55:31 +01:00
2016-11-20 02:58:43 +01:00
2016-11-20 02:58:43 +01:00
2016-11-20 02:58:43 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-02-26 02:55:24 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2016-11-20 02:58:43 +01:00
2017-01-23 15:58:56 +01:00
2016-11-20 02:58:43 +01:00
2017-03-19 02:55:34 +01:00
2016-11-20 02:58:43 +01:00
2017-02-26 02:55:24 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-24 11:28:31 +01:00
2017-02-19 02:54:42 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-01-29 02:55:31 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2016-12-11 02:58:13 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2016-09-06 10:20:41 +02:00
2016-12-04 02:57:30 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2016-09-06 10:20:41 +02:00
2017-03-19 02:55:34 +01:00
2017-03-21 11:50:12 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-01 02:54:50 +01:00
2016-11-27 02:57:09 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-01 02:54:50 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-02-26 02:55:24 +01:00
2016-11-20 02:58:43 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-01 02:54:50 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-05 02:55:35 +01:00
2017-03-05 02:55:35 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2016-11-20 02:58:43 +01:00
2017-02-19 02:54:42 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2016-11-20 02:58:43 +01:00
2016-11-20 02:58:43 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00
2017-03-05 02:55:35 +01:00
2016-11-20 02:58:43 +01:00
2017-03-19 02:55:34 +01:00
2017-03-05 02:55:35 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-05 02:55:35 +01:00
2017-03-19 02:55:34 +01:00
2017-03-24 15:03:54 +01:00
2017-02-26 02:55:24 +01:00
2017-03-05 02:55:35 +01:00
2017-01-29 02:55:31 +01:00
2017-03-19 02:55:34 +01:00
2017-02-19 02:54:42 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-02-26 02:55:24 +01:00
2017-03-12 02:54:51 +01:00
2017-02-12 02:53:52 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-01-29 02:55:31 +01:00
2017-03-05 02:55:35 +01:00
2017-03-12 02:54:51 +01:00
2017-02-26 02:55:24 +01:00
2017-03-12 02:54:51 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-02-05 02:54:43 +01:00
2017-03-19 02:55:34 +01:00
2017-02-26 02:55:24 +01:00
2017-03-19 02:55:34 +01:00
2017-02-26 02:55:24 +01:00
2017-03-19 02:55:34 +01:00
2017-03-12 02:54:51 +01:00
2017-03-19 02:55:34 +01:00
2017-03-19 02:55:34 +01:00