Invoiced quantity fails if invoice line has no unit
From https://discuss.tryton.org/t/add-additional-advance-payment-in-sale/6426/3
The code is not expecting to have no unit on the invoice line (because normally they are created by the sale or purchase for which there is always a unit). We already have code to ensure that the same category of unit as the origin is used (see #9142 (closed)) but it is not enough if no product is set on the invoice line such that the unit is not set (as it is not required).
I see few options here:
- make the unit required when an origin is set on the invoice line (but this may not be always true for every invoice line created by documents)
- ignore such invoice line in the invoiced quantity
- consider that the unit is the same as the origin