diff options
| author | Adrian Torres <adt@odoo.com> | 2019-07-10 08:51:39 +0000 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2019-07-10 08:58:27 +0000 |
| commit | 46d12675a7273d2a4e513644016e9a06e9d7ae64 (patch) | |
| tree | 7bceb21e2f1edb5617bdc10efe95ec1c319050da /odoo/addons/test_testing_utilities/models.py | |
| parent | ddada7bb9e0bbe8d0a3ef6194b372451a1c71ab7 (diff) | |
[FIX] tests: allow False as value for required booleans in SSF
A required boolean accepts two values, True and False, however the SSF
and the web-client assume False to be equal to NULL and treat them
interchangeably.
In the SSF, we verify that a required field is filled by checking that
its value is different from False, however False is a valid value for a
boolean, this means that setting a required boolean to False would never
work in the SSF.
This commit overcomes this issue by simply skipping the check for fields
of type boolean.
closes odoo/odoo#34729
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'odoo/addons/test_testing_utilities/models.py')
| -rw-r--r-- | odoo/addons/test_testing_utilities/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/odoo/addons/test_testing_utilities/models.py b/odoo/addons/test_testing_utilities/models.py index 0c04bc06e8d..0b87c3e66b1 100644 --- a/odoo/addons/test_testing_utilities/models.py +++ b/odoo/addons/test_testing_utilities/models.py @@ -261,3 +261,8 @@ class O2MReadonlySubfieldChild(models.Model): def _inverse_f(self): raise AssertionError("Inverse of f should not be called") + +class ReqBool(models.Model): + _name = _description = 'test_testing_utilities.req_bool' + + f_bool = fields.Boolean(required=True) |
