[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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user