Purchasing Line Error

I want to test the purchase features. When I want to choose lines this happen:

Warning:
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 46, 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 181, in wrapper
    return func(request, pool, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/protocols/dispatcher.py", line 185, in _dispatch
    result = rpc.result(meth(inst, *c_args, **c_kwargs))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/model/modelview.py", line 88, in wrapper
    result = func(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/model/fields/field.py", line 123, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/trytond/modules/purchase/purchase.py", line 1323, in on_change_product
    category = self.product.purchase_uom.category
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'category'

It seems you manage to select a product that is not purchasable (or no more) for the purchase line.
Normally there is a domain that enforce that.