Opening purchase reporting per product crashes
Here is the traceback:
Traceback (most recent call last):
File "/home/ced/Projects/tryton/trytond/trytond/protocols/wrappers.py", line 197, in wrapper
return func(request, pool, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/protocols/dispatcher.py", line 196, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/model/modelsql.py", line 1173, in read
getter_results = field.get(
^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/model/fields/function.py", line 27, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/transaction.py", line 50, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/model/fields/function.py", line 162, in get
return dict((name, call(name)) for name in names)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/model/fields/function.py", line 162, in <genexpr>
return dict((name, call(name)) for name in names)
^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/model/fields/function.py", line 133, in call
return {r.id: convert(method(r, name)) for r in records}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/model/fields/function.py", line 133, in <dictcomp>
return {r.id: convert(method(r, name)) for r in records}
^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/modules/purchase/purchase_reporting.py", line 146, in get_trend
chart.add('', [getattr(ts, name) if ts else 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ced/Projects/tryton/trytond/trytond/modules/purchase/purchase_reporting.py", line 146, in <listcomp>
chart.add('', [getattr(ts, name) if ts else 0
^^^^^^^^^^^^^^^^^
AttributeError: 'One2Many' object has no attribute 'expense'