diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2019-12-16 17:22:07 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2019-12-19 20:35:08 +0000 |
| commit | adc49e76fcec6490e321d87657eda5cea0293da7 (patch) | |
| tree | 8cd1639a214e24985a603d94d8a7d80e6c4e8735 /addons/web/static/src/xml/web_calendar.xml | |
| parent | 705b2faa695a42071fea4124aa9ac320ac0839df (diff) | |
[FIX] expression.py: avoid using TRUE_DOMAIN/FALSE_DOMAIN
Ensure that expression.OR and expression.AND and some other
expression.py methods do not propagate or rely on TRUE_DOMAIN and
FALSE_DOMAIN that may be muted on some instance.
For example, if we did:
self.search(expression.OR([]))
then in the search method we do something like:
received_domain.append(('res_field', '=', False))
before this commit, FALSE_DOMAIN would be altered for any succeeding code
that try to use it in `[(0, '=', 1), ('res_field', '=', 'False')]`.
Without the changeset, the added test would fail with:
[(1, '=', 1), ('id', '=', 1)] != [(1, '=', 1)]
[(0, '=', 1), ('id', '=', 1)] != [(0, '=', 1)]
[(0, '=', 1), ('id', '=', 1)] != [(0, '=', 1)]
[(1, '=', 1), ('id', '=', 1)] != [(1, '=', 1)]
[(1, '=', 1), ('id', '=', 1)] != [(1, '=', 1)]
note: another commit referenced in #41968 should make the TRUE_DOMAIN
and FALSE_DOMAIN immutable.
related to work on opw-2154448
closes #42107
closes odoo/odoo#42222
X-original-commit: 303ce32e6ccd7432b96ffae545e4a6eced68ae84
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web/static/src/xml/web_calendar.xml')
0 files changed, 0 insertions, 0 deletions
