summaryrefslogtreecommitdiff
path: root/odoo/tests
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2020-05-19 08:53:08 +0000
committerXavier Morel <xmo@odoo.com>2020-05-19 11:08:20 +0000
commitfbfd36aabb840e7ebdc6f3034b389ac7f49de43a (patch)
treee684097b83d33e0b3312976ebe254adf1e1d3f0c /odoo/tests
parent5a5eced13cbffd62f2699f46c0e80b868a3bf79c (diff)
[FIX] core: fix _cleanup_from_default
Technically removing the entire thing if it's not one of the special cases is a form of cleanup I guess, but that seems a bit brutal and counter-productive. So that function should *probably* return the input value if it's not a type which requires special processing. closes odoo/odoo#51531 X-original-commit: b42994c87dce12c5ba22943f6cbe00240fe43138 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'odoo/tests')
-rw-r--r--odoo/tests/common.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/odoo/tests/common.py b/odoo/tests/common.py
index a0caa54f547..d8ea680415c 100644
--- a/odoo/tests/common.py
+++ b/odoo/tests/common.py
@@ -2389,6 +2389,7 @@ def _cleanup_from_default(type_, value):
return odoo.fields.Datetime.to_string(value)
elif type_ == 'date' and isinstance(value, date):
return odoo.fields.Date.to_string(value)
+ return value
def _get_node(view, f, *arg):
""" Find etree node for the field ``f`` in the view's arch