Filtering on datetime crashes
Using sao when adding the filter Date: <=27/11/2023
in the Administratión -> Models -> Models -> Logs
and clicking the search button the following error is raised:
Traceback (most recent call last):
File "usrlocallibpython3.11dist-packagestrytondwsgi.py", line 109, in dispatch_request
return endpoint(request, **request.view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondprotocolsdispatcher.py", line 43, in rpc
return methods.get(request.rpc_method, _dispatch)(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondwsgi.py", line 75, in wrapper
return func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondprotocolswrappers.py", line 197, in wrapper
return func(request, pool, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondprotocolsdispatcher.py", line 196, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondirresource.py", line 73, in search
result = super().search(
^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelmodelsql.py", line 1766, in search
tables, expression = cls.__search_query(domain, count, query, order)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelmodelsql.py", line 1685, in __search_query
tables, expression = cls.search_domain(domain)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelmodelsql.py", line 1905, in search_domain
expression = convert(domain)
^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelmodelsql.py", line 1901, in convert
return And((convert(d) for d in (
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelmodelsql.py", line 1901, in <genexpr>
return And((convert(d) for d in (
^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelmodelsql.py", line 1892, in convert
expression = field.convert_domain(domain, tables, cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelfieldsfield.py", line 217, in wrapper
return func(self, domain, tables, Model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelfieldsfield.py", line 456, in convert_domain
expression = Operator(column, self._domain_value(operator, value))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelfieldsfield.py", line 436, in _domain_value
return self.sql_format(value)
^^^^^^^^^^^^^^^^^^^^^^
File "usrlocallibpython3.11dist-packagestrytondmodelfieldsdate.py", line 88, in sql_format
value = datetime.datetime.fromisoformat(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Invalid isoformat string: '27112023'
I reproduced it on demo of 7.0 series.