[ERROR,DialogErrorHandler,http-8080-8] Failed to validate Product of Product Stock Location: errorMessage
Submitted by Ben_Charlton on Mon, 11/04/2016 - 10:40
When attempting to update a price on a service we are getting the error
[ERROR,DialogErrorHandler,http-8080-8] Failed to validate Product of Product Stock Location: errorMessage
[ERROR,DialogErrorHandler,http-8080-8] Failed to validate Product of Product Stock Location: errorMessage
[ERROR,DialogErrorHandler,http-8080-8] Failed to validate Product of Product Stock Location: errorMessage
[ERROR,DialogErrorHandler,http-8080-8] Failed to validate Product of Product Stock Location: errorMessage\
This is within a 1.7.1 system.
Anyone have anyideas - there is no stacktrace in the logs for this error. It seems to occur when I go in and look at the stock location as well under administration
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
It seems to only occur on a subset of products...
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
Possibly related: http://www.openvpms.org/forum/adding-stock-location-existing-product-1.8...
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
In this case no inactive locations however we do have inactive suppliers
Activating them made no difference to the error however.
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
Ok so further investigation shows that these services somehow have a entityRelationship.productStockLocation in the ER table that are linked to a supplier despite them being services.... oddly they are linked to a supplier that is inactive
Please note the data load was done by a third party not by me ...so I am flying blind here at the moment
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
That would do it. The Product - Stock Location relationship is limited to medication and merchandise products. You'll need to remove the relationship.
You can either do this by SQL, or by temporarily setting the the stockLocations node of Service to hidden="false", so you can delete them via the GUI.
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
Ok now I see the product.service archetype loaded in the system has product stock locations with max and min card set at 0....
Found a modified archetype on the system...
???
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
There is also a modified archetype for entityRelationships.productStockLocation to add product.services.
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
The easiest fix would be to load those archetypes, although you will have an ongoing maintenance issue.
Another approach would be to check to see if the service products really need stock control. If not, just delete the stock relationships and use the standard archetypes.
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
...The practice swears they havent touched archetypes ....but the ones in the system were definitally different...
Re: [ERROR,DialogErrorHandler,http-8080-8] Failed to ...
It may have been done as part of the initial install, or perhaps some medication products have been changed to service products via SQL and the stock relationships left in place. In this case, the archetype changes would have been needed to avoid the validation errors.