Your team submits a Stock Entry for a finished batch of 200 units. No one inspected it, the entry goes through, the goods move to finished stock, and a week later a customer reports 30 units out of spec. ERPNext can stop that entry until an inspection is submitted, but only when inspection is switched on where it belongs: on the BOM for manufacture, on the Item for purchase and delivery, with a template to inspect against and the Stock Settings action set to Stop. Miss one, and goods go through unchecked.
Quality Inspection in ERPNext is a gate, not a monitor. It doesn't watch continuously; it holds a specific transaction (a Stock Entry, Purchase Receipt or Delivery Note) until an inspector records readings and marks the inspection Accepted or Rejected. The gate only holds when the setup is complete. I am Manoj, and I lead ERPNext and Frappe implementations at MithTech, a team of Frappe specialists in Bengaluru. Quality gates come up early with manufacturers who work to ISO 9001 or a customer's quality plan.
When does Quality Inspection trigger?
Quality Inspection in ERPNext isn't automatic: it is a gate on specific transactions. It applies at different points depending on what you switch on.
Interactive
Inspection Flow Simulator
Select a scenario (Purchase Receipt, Work Order completion or Delivery Note) and click through each step to see when QI triggers, what the inspector fills in, and what happens on Accept vs Reject.
The critical point: for manufacture, the switch is "Quality Inspection Required" on the BOM the Work Order uses. A template linked on the Item is not enough on its own, and if Stock Settings is set to Warn rather than Stop, a missing or rejected inspection gives a warning and the entry still submits.
How do you design an inspection template?
A Quality Inspection Template defines what is inspected: the parameters, the acceptable values and the units. The Template Builder below lets you design one.
Interactive
QI Template Builder
Build a Quality Inspection Template with numeric parameters (min/max ranges) and visual pass/fail checks. The example is a shaft assembly with four parameters; change it or start fresh.
When you design templates:
- Numeric parameters with minimum and maximum values are the most useful: they give you data for trends and capability studies, and leave no room for interpretation.
- Pass/fail parameters (no numeric range) are for checks you can't measure: surface finish, colour match, label present. Use them sparingly; they depend on the inspector's judgement.
- One template per product family, not per product. If five shaft variants share the same requirements, use one template and link it to each item.
- Keep the list short. A long list slows the inspector and invites mistakes. If you need many checks, split them into an incoming-material template and a final-inspection template.
What do the automation scripts do?
Three scripts complete the workflow: auto-creation (so inspectors don't create inspections by hand), rejection handling (so rejected goods move to the right warehouse) and a report query (so you can track pass and fail rates).
Code recipe
Quality Inspection Recipe
Python recipe: auto-create QI on a Manufacture Stock Entry, handle rejections with a warehouse transfer, and query pass/fail rates for a QI report.
0 of 5 steps done
Tick a step’s number when it is done; the ticks stay on this device.
Add the auto-creation server script
Go to Server Script, New, with Stock Entry as the reference doctype. The script checks whether the entry is a Manufacture and whether the finished item has a template; if so, it creates a Quality Inspection filled with the template's parameters and links it to the entry's row.
Choose a rejection warehouse
Create a warehouse for rejected goods under your manufacturing warehouse group, for example "Rejected - Plant 1". ERPNext has no default rejection warehouse setting for manufacture, so the script needs this warehouse named in it. On purchase receipts, the receipt's own Rejected Warehouse field does this job.
Add the rejection handler
Create another server script on Quality Inspection, on submit. When an inspection is submitted as Rejected, it creates a Material Transfer moving the goods from the work-in-progress warehouse to your rejection warehouse.
Build the report
Create a Script Report from the report query. It shows pass and fail rates by item and template, lowest pass rate first: the items that need attention. Use the date filter to track improvement.
Test the whole flow
On a test Work Order, make the Manufacture Stock Entry and check the inspection is created. Enter readings within spec, submit the inspection, then the entry: the goods move to finished stock. Then test a rejection: readings out of spec, inspection submitted as Rejected, and check the entry is stopped and the transfer is created.
What is on the QI readiness checklist?
Before you go live with quality inspection in manufacturing, check every setting. The checklist below lists the requirements; where it names a setting, use the v15 locations in the callout above.
Interactive
QI Readiness Checklist
Configuration items to verify before enabling Quality Inspection in your ERPNext manufacturing workflow. Check each one off as you confirm it.
What should you know before you commit?
Inspection takes time. Every Manufacture Stock Entry now needs an inspection. If the floor submits many entries a day, that is many inspections, and each takes longer the more parameters it has. Decide whether you inspect every batch or a sample.
Formula-based criteria. A template parameter can use a formula as its acceptance criterion instead of a minimum and maximum, by ticking "Formula Based Criteria" and writing the condition. Use it for acceptance logic a simple range can't express.
Incoming material. The same templates work for incoming inspection. Tick "Inspection Required before Purchase" on the raw-material Item, and the Purchase Receipt needs an inspection before it submits (with Stock Settings set to Stop). Link different templates for raw materials and finished goods.
Batch-wise inspection. If your items use batches, make one inspection per batch, not per Stock Entry, and set the batch on the Quality Inspection. That lets you trace a quality problem back to a batch. The Trace a bad batch demo shows that trace on a demo company.
| Trigger point | Where to switch it on | Transaction held | Common use |
|---|---|---|---|
| Purchase Receipt | Item: Inspection Required before Purchase | Purchase Receipt | Incoming raw material |
| Stock Entry (Manufacture) | BOM: Quality Inspection Required + template | Manufacture Stock Entry | Finished goods after production |
| Job Card (operation) | Operation: Quality Inspection Template | Job Card | In-process checks at an operation |
| Delivery Note | Item: Inspection Required before Delivery | Delivery Note | Outgoing check before dispatch |
At a glance
| Aspect | What to know |
|---|---|
| Manufacture | BOM: "Quality Inspection Required" and a template |
| Purchase and delivery | Item: "Inspection Required before Purchase" / "before Delivery" |
| Stop or warn | Stock Settings: actions if not submitted, and if rejected |
| Rejected goods | Purchase Receipt has a Rejected Warehouse; for manufacture, move them with a script or by hand |
Frequently asked questions
How do I set up Quality Inspection in ERPNext manufacturing?
Create a Quality Inspection Template with parameters and acceptable values, tick "Quality Inspection Required" on the finished item's BOM and choose the template, and set the two Stock Settings actions to Stop. From then on, the Manufacture Stock Entry needs a submitted, accepted Quality Inspection before it submits.
Why can I submit a Stock Entry without Quality Inspection?
Usually one of three reasons: the BOM the Work Order uses doesn't have "Quality Inspection Required" ticked; Stock Settings is set to Warn, not Stop, for a missing inspection; or the entry is not a Manufacture (for purchase and delivery the switch is on the Item). Check all three.
How do I auto-create Quality Inspection in ERPNext?
Add a server script on Stock Entry. It checks whether the entry is a Manufacture and the finished item has a template; if so, it creates a Quality Inspection filled with the template's parameters and links it to the entry. The inspector enters the readings before the entry can be submitted.
What happens when Quality Inspection is rejected in ERPNext?
With Stock Settings set to Stop for rejected inspections, the transaction is held. On a purchase receipt, rejected quantity can go to the receipt's Rejected Warehouse. On a manufacture entry, ERPNext doesn't move the goods by itself, so use a script like the one in this guide, or a manual Material Transfer, to move them to a rejection warehouse.
Can I use Quality Inspection for incoming materials in ERPNext?
Yes. Tick "Inspection Required before Purchase" on the raw-material Item and link a template. The Purchase Receipt then needs a Quality Inspection before it submits, if Stock Settings is set to Stop. Use different templates for raw materials and finished goods.
How do I track quality inspection pass/fail rates in ERPNext?
Create a Script Report on the Quality Inspection doctype that groups by item and template and counts Accepted against Rejected. The report query in this guide does this; filter by date to track improvement and sort by lowest pass rate to see which items need attention.
What is a Quality Inspection Template in ERPNext?
It defines the inspection for an item: parameter names, acceptable minimum and maximum values or a formula, and whether a parameter is numeric. When a Quality Inspection is created, the parameters are copied from the template; the inspector enters readings and ERPNext checks them against the criteria.
Which ERPNext version does this guide apply to?
ERPNext v15; the setting names were checked against the v15 source on 12 October 2026. The server scripts use standard Frappe calls. Check the BOM, Item and Stock Settings forms on your own version if you are on v14 or v16.
Quality Inspection in ERPNext is a gate: it holds a transaction until an inspection is accepted. It only holds when inspection is switched on in the right place (the BOM for manufacture, the Item for purchase and delivery) and Stock Settings says Stop. The auto-creation script removes the manual step teams skip, and the rejection handler moves defective goods out of the production flow.
Comments & ratings
No comments yet. Start a new discussion.
Manoj · Published on 4 August 2026
Worked with us? Leave a Google review