Crash when finishing production with a product with empty list price
Since #10244 (closed) it is possible to have products wihtout list price. But when using a product without list price on a production I get the following traceback:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 117, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 47, in rpc
return methods.get(request.rpc_method, _dispatch)(
File "/trytond/wsgi.py", line 84, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 159, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 181, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/model/modelview.py", line 774, in wrapper
return func(cls, records, *args, **kwargs)
File "/trytond/model/workflow.py", line 37, in wrapper
result = func(cls, filtered, *args, **kwargs)
File "/trytond/modules/company/model.py", line 67, in wrapper
result = func(cls, records, *args, **kwargs)
File "/trytond/modules/production/production.py", line 736, in done
cls.set_cost(productions)
File "/trytond/modules/production/production.py", line 578, in set_cost
product_price = (Decimal(str(output.quantity))
TypeError: unsupported operand type(s) for *: 'Decimal' and 'NoneType'