Fail to get cost value of product from a company with timezone
Here is the traceback:
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 204, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
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 129, in call
return {
File "/trytond/model/fields/function.py", line 130, in <dictcomp>
r.id: on_change_with_result(self, method(r, name))
File "/trytond/modules/stock/location.py", line 730, in get_product
value = getattr(self.product, name)
File "/trytond/model/fields/function.py", line 160, in __get__
return super().__get__(inst, cls)
File "/trytond/model/fields/field.py", line 391, 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/product.py", line 242, in get_cost_value
products = [p for p in products
File "/trytond/modules/stock/product.py", line 243, in <listcomp>
if p.create_date <= context['_datetime']]
TypeError: can't compare offset-naive and offset-aware datetimes
Fault: can't compare offset-naive and offset-aware datetimes