Crash on Purchase by supplier report
On demo6.6, when going to Purchase > Reporting > Purchase > Purchase by supplier the following crash raises:
Traceback (most recent call last):
File "/usr/local/lib/python39/dist-packages/trytond/wsgipy", line 119, in dispatch_request
return endpoint(request, **requestview_args)
File "/usr/local/lib/python39/dist-packages/trytond/protocols/dispatcherpy", line 49, in rpc
return methodsget(requestrpc_method, _dispatch)(
File "/usr/local/lib/python39/dist-packages/trytond/wsgipy", line 86, in auth_required
return wrapped(*args, **kwargs)
File "/usr/local/lib/python39/dist-packages/trytond/protocols/wrapperspy", line 162, in wrapper
return func(request, pool, *args, **kwargs)
File "/usr/local/lib/python39/dist-packages/trytond/protocols/dispatcherpy", line 207, in _dispatch
result = rpcresult(meth(*c_args, **c_kwargs))
File "/usr/local/lib/python39/dist-packages/trytond/model/modelsqlpy", line 1078, in read
getter_results = fieldget(
File "/usr/local/lib/python39/dist-packages/trytond/model/fields/functionpy", line 26, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/python39/dist-packages/trytond/model/fields/functionpy", line 137, in get
return dict((name, call(name)) for name in names)
File "/usr/local/lib/python39/dist-packages/trytond/model/fields/functionpy", line 137, in <genexpr>
return dict((name, call(name)) for name in names)
File "/usr/local/lib/python39/dist-packages/trytond/model/fields/functionpy", line 132, in call
return dict((rid, method(r, name)) for r in records)
File "/usr/local/lib/python39/dist-packages/trytond/model/fields/functionpy", line 132, in <genexpr>
return dict((rid, method(r, name)) for r in records)
File "/usr/local/lib/python39/dist-packages/trytond/modules/purchase/purchase_reportingpy", line 146, in get_trend
chartadd('', [getattr(ts, name) if ts else 0
File "/usr/local/lib/python39/dist-packages/trytond/modules/purchase/purchase_reportingpy", line 146, in <listcomp>
chartadd('', [getattr(ts, name) if ts else 0
AttributeError: 'One2Many' object has no attribute 'expense'