Crash when oppening products by location on latest trunk
On latest trunk, if I open products by location of a product I get the following error:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 109, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 43, in rpc
return methods.get(request.rpc_method, _dispatch)(
File "/trytond/wsgi.py", line 75, in wrapper
return func(request, *args, **kwargs)
File "/trytond/protocols/wrappers.py", line 189, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 196, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/model/modelsql.py", line 1722, in search
tables, expression = cls.__search_query(domain, count, query, order)
File "/trytond/model/modelsql.py", line 1641, in __search_query
tables, expression = cls.search_domain(domain)
File "/trytond/model/modelsql.py", line 1859, in search_domain
expression = convert(domain)
File "/trytond/model/modelsql.py", line 1855, in convert
return And((convert(d) for d in (
File "/trytond/model/modelsql.py", line 1855, in <genexpr>
return And((convert(d) for d in (
File "/trytond/model/modelsql.py", line 1853, in convert
return Or((convert(d) for d in domain[1:]))
File "/trytond/model/modelsql.py", line 1853, in <genexpr>
return Or((convert(d) for d in domain[1:]))
File "/trytond/model/modelsql.py", line 1846, in convert
expression = field.convert_domain(domain, tables, cls)
File "/trytond/model/fields/field.py", line 220, in wrapper
return func(self, domain, tables, Model)
File "/trytond/model/fields/function.py", line 98, in convert_domain
return getattr(Model, self.searcher)(self.name, domain)
File "/trytond/modules/stock/location.py", line 450, in search_quantity
if operator_(getattr(location, name), operand):
File "/trytond/model/fields/function.py", line 160, in __get__
return super().__get__(inst, cls)
File "/trytond/model/fields/field.py", line 404, in __get__
return inst.__getattr__(self.name)
File "/trytond/model/modelstorage.py", line 1807, in __getattr__
read_data = self.read(list(index.keys()), list(ffields.keys()))
File "/trytond/model/modelsql.py", line 1139, in read
getter_results = field.get(
File "/trytond/model/fields/function.py", line 27, in wrapper
return func(self, *args, **kwargs)
File "/trytond/transaction.py", line 50, in wrapper
return func(*args, **kwargs)
File "/trytond/model/fields/function.py", line 136, in get
return dict((name, call(name)) for name in names)
File "/trytond/model/fields/function.py", line 136, in <genexpr>
return dict((name, call(name)) for name in names)
File "/trytond/model/fields/function.py", line 127, in call
return on_change_with_result(self, method(records, name))
File "/trytond/modules/stock/location.py", line 409, in get_quantity
and (trans_context.get('stock_date_end', datetime.date.max)
TypeError: '>' not supported between instances of 'NoneType' and 'datetime.date'