#428 NPE when reversing an invoice including a product with inactive UOM conversion
Testcase to check if reversing an invoice including a product with inactive UOM conversion does not cause a NPE.
-
Make sure P0001 has different price & product UOM, and an active UOM conversion
- Create a sales order for G000X, for P0001:
- product UOM: Pce
- price UOM: Kg (or the other way round)
-
Create the inout, and the invoice
- Check the invoice candidate for P0001:
- => IC is completely invoiced
-
Set the UOM conversion for P0001 inactive, save
- Reverse the invoice you created:
- => no NPE
- => invoice is reversed normally
- Go back to invoice candidates:
- => IC for P0001 has error and msg about UOM conversion problem
- => IC is not completely invoiced anymore, and can be invoiced again (if the UOM conversion is set active again)
-
Set the UOM conversion for P0001 active again, save
- Uncheck the Error checkbox in the invoice candidate for P0001, save, refresh:
- => IC is updated: no more error, IC can be invoiced again
- Create the invoice again:
- => invoice is created ad before
View source file on GitHub.com