I my sales list, there is one incident with invoice status “waiting”.
When I open it and look at the corresponding invoice, that one has status “payed”.
There is only that single sale, and only one single invoice, AFAIK no cancellations etc.
What could I have done wrong?
In fact you’re right - the “process” button still shows up. Sorry, I should have seen that.
When I press it, I get this error:
missing to_uom
Traceback (most recent call last):
File "/trytond/wsgi.py", line 110, 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 77, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 131, 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 "/kopen_web_shop_woocommerce-5.6.0-py3.8.egg/trytond/modules/web_shop_woocommerce/web.py", line 521, in process
super().process(sales)
File "/trytond/model/modelview.py", line 729, in wrapper
return func(cls, records, *args, **kwargs)
File "/trytond/modules/sale/sale.py", line 958, in process
sale.create_invoice()
File "/trytond/modules/sale/sale.py", line 788, in create_invoice
invoice_lines.append(line.get_invoice_line())
File "/trytond/modules/sale/sale.py", line 1399, in get_invoice_line
- self._get_invoiced_quantity())
File "/trytond/modules/sale/sale.py", line 1473, in _get_invoiced_quantity
quantity += Uom.compute_qty(invoice_line.unit,
File "/trytond/modules/product/uom.py", line 198, in compute_qty
raise ValueError("missing to_uom")
ValueError: missing to_uom
Fault: missing to_uom
Right - I found one line without a unit in “sales”, the corresponding item in “invoices” has a unit set. What could I do? - In the “sales” section, I cannot make any changes, everything is grayed. So do I need to edit the database with pgadmin?
You have to look in the sale_line table. You also need the ID of your sale order to find the lines.
To find the ID of your sale-order:
Open the list of sale orders
Select the right sale order
Use that big button with triangular shape at the top
Click on “View Logs …”
You will find the ID in the popup. That ID can be used to search in your sale_line table. Search for column sale and you will only get the lines which are on that particular sale.
Now you can easy change the uom which is just an integer to the underlying uom table.
I don’t have any experience with PgAdmin but the SQL-queries should be something like:
SELECT * FROM sale_line WHERE sale=<your sale ID>;
UPDATE sale_line SET uom=<uom ID> WHERE id=<sale line id>;
The first one is to get the lines of the sale order so you can look for the line without a uom. The second one is used to update that line and add a uom to it.
Just to mention, <your sale ID> is not the same as <sale line id>
Being something of a sissy, I used PgAdmin which made it easy enough for me - I filled in the id “33” instead of “null” at “unit integer”, hit “save changes” - and that was it. Problem solved - I hope. Let’s see.