AttributeError when invoicing a project with tasks without product
When invoicing by progress a task without product the following exception is raised:
File "/trytond/wsgi.py", line 47, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 55, in rpc
request, database_name, *request.params)
File "/trytond/wsgi.py", line 39, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 41, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 174, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/model/modelview.py", line 615, in wrapper
return func(cls, *args, **kwargs)
File "/trytond/modules/project_invoice/work.py", line 365, in invoice
invoice_lines = work._get_lines_to_invoice()
File "/trytond/modules/project_invoice/work.py", line 547, in _get_lines_to_invoice
lines += children._get_lines_to_invoice(test=test)
File "/trytond/modules/project_invoice/work.py", line 542, in _get_lines_to_invoice
self.invoice_method)()
File "/trytond/modules/project_invoice/work.py", line 496, in _get_lines_to_invoice_progress
quantity = Uom.compute_qty(hour, quantity, self.product.default_uom)
AttributeError: 'NoneType' object has no attribute 'default_uom'
'NoneType' object has no attribute 'default_uom'
It should raise an error showing a missing product instead.