# Purchasing Line Error

**URL:** <https://discuss.tryton.org/t/purchasing-line-error/7791>\
**Category:** User\
**Created:** [September 3, 2024, 9:47pm UTC](https://discuss.tryton.org/t/purchasing-line-error/7791 "2024-09-03T21:47:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siobhan](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@Siobhan](https://discuss.tryton.org/u/Siobhan)\
**Post date:** [September 3, 2024, 9:47pm UTC](https://discuss.tryton.org/t/purchasing-line-error/7791/1 "2024-09-03T21:47:30Z")

</div>

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

 ![Screenshot from 2024-09-04 04-44-45](https://discuss-cdn.tryton.org/uploads/default/original/2X/e/e2d4680dfdbb008db5cbcfa1bde48a06c204d6dd.jpeg)

 ![Screenshot from 2024-09-04 04-44-25](https://discuss-cdn.tryton.org/uploads/default/original/2X/6/63da1cc985333869f3f6fc1182d493b5201903ed.png)

```auto
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'

```

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [September 4, 2024, 5:53am UTC](https://discuss.tryton.org/t/purchasing-line-error/7791/2 "2024-09-04T05:53:15Z")

</div>

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.
