summaryrefslogtreecommitdiff
path: root/odoo/tests
diff options
context:
space:
mode:
authorLuis González <lgonzalez@vauxoo.com>2020-08-06 21:58:16 +0000
committerLuis González <lgonzalez@vauxoo.com>2020-08-26 15:13:18 +0000
commitc0295f4b0211bb29133428b8a803c1ed2b1d22c6 (patch)
treebc4ca5d016a83a89cd31cd11900b26fac0967671 /odoo/tests
parentbde23b82029507e525cf55d11b050af5f820a06b (diff)
[FIX] tests: Handle attrs containing numbers instead of bool
The Form class already handles cases for attrs that contain boolean values, e.g.: `attrs="{'readonly': True}"` But it doesnt for integers, e.g.: `attrs="{'readonly': 1}"` This commit changes the expected non-domain value from boolean to integer, because both are valid cases and the former is a subset of the latter. [1] https://github.com/odoo/odoo/blob/b3d4938ba6b1/addons/repair/views/repair_views.xml#L54 closes odoo/odoo#56609 X-original-commit: 782534a429f10e7b114c838687d38aa4080a920c Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com> Signed-off-by: Luis González [Vauxoo] <luisg123v@users.noreply.github.com>
Diffstat (limited to 'odoo/tests')
-rw-r--r--odoo/tests/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/tests/common.py b/odoo/tests/common.py
index 106cde6f74e..5d2b6eb93d0 100644
--- a/odoo/tests/common.py
+++ b/odoo/tests/common.py
@@ -1676,7 +1676,7 @@ class Form(object):
order.append(fname)
modifiers[fname] = {
- modifier: domain if isinstance(domain, bool) else normalize_domain(domain)
+ modifier: bool(domain) if isinstance(domain, int) else normalize_domain(domain)
for modifier, domain in json.loads(f.get('modifiers', '{}')).items()
}
ctx = f.get('context')