Thanks all for your suggestion. Actually, we disabled the configuration key for Advance Warehouse Management and we are not getting this error anymore.
But now another issue is that the quality order journal from the production order has also disappeared.