diff --git a/product/ERP5Form/FormulatorPatch.py b/product/ERP5Form/FormulatorPatch.py index 367c32a6738dbb68eefef813aee26119b2ee04b2..16b489a3e16f122ad53ef3a0b17920f3b01cd785 100644 --- a/product/ERP5Form/FormulatorPatch.py +++ b/product/ERP5Form/FormulatorPatch.py @@ -746,7 +746,10 @@ class PatchedDateTimeWidget(DateTimeWidget): if not hasattr(field, 'sub_form'): field.sub_form = create_datetime_text_sub_form() - if value is None and field.get_value('default_now'): + # Is it still usefull to test the None value, + # as DateTimeField should be considerer as the other field + # and get an empty string as default value? + if value in (None, '') and field.get_value('default_now'): value = DateTime() year = None month = None