From fbfd36aabb840e7ebdc6f3034b389ac7f49de43a Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 19 May 2020 08:53:08 +0000 Subject: [PATCH] [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) --- odoo/tests/common.py | 1 + 1 file changed, 1 insertion(+) 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