I have tried searching for this in number of places. But, unsuccessful. I am looking for a query that will get me the items that are pending inspection - post receipt. We are still on 1.0.3. I know I know it a very old version. So, if you can get me a query for any ERP version, I should be able to tweak it to our version.
You can look into rcv_transactions for those po_line_ids that have a record with a transaction_type of RECEIVE but don't have record with a transaction_type of accept.
Keep in mind that for a received quantity of 10, you may have delivered 3 first and then 1 later.
So you need to add up all quantities with transaction type of ACCEPT and then compare to the RECEIVE quantities.
Also keep in mind that corrections will add complexity to your query.
Hi Karthik, Dipanjan's query will more or less serve your purpose. But the query doesn't consider the receipt routing type, which means it will give those records also where the routing was either "Standard" or "Direct". Also as Sandeep said, you have to consider the other scenarios also like when the item is being returned or receipt is being corrected or multiple receiving has been done as these records may give you repeated records for receipt number.