| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Inventory (stock) • Purchase (purchase) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 4962 |
| Technical Name |
grev_od_purchase_trade_inspection |
| License | OPL-1 |
| Website | https://www.grevlin.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Inventory (stock) • Purchase (purchase) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 4962 |
| Technical Name |
grev_od_purchase_trade_inspection |
| License | OPL-1 |
| Website | https://www.grevlin.com |
Purchase Trade InspectionPre-Shipment, Regulatory & Customs Inspection Management for International Trade
|
|
|
|
|
|
|
|
|
Need Help?For support, contact us at odoo@grevlin.com X: @GrevlinGlobal
|
|
Grevlin Global Corp. Professional Odoo Solutions for Enterprise Procurement |
Purchase Trade Inspection — Documentation
Pre-shipment, regulatory, and customs inspection management for international trade procurement.
The Purchase Trade Inspection module manages the full lifecycle of trade inspections — from scheduling and agency assignment through checklist execution, certificate issuance, and shipment gate control. It supports PSI, PVOC, SONCAP, Phytosanitary, and customs inspections with immutable audit trails.
Overview
Key Features
- Pre-Shipment Inspection (PSI): Buyer-requested factory inspections with structured checklists to verify quality, quantity, packaging, and labeling before goods ship.
- Legal / Regulatory Inspections: PVOC, SONCAP, Phytosanitary, COI, and country-specific mandate management with accredited agency assignment.
- Customs Inspection: Documentary and physical examination workflows for border control compliance.
- Inspection Agency Registry: Accreditation tracking, coverage countries, cost rates, and performance history.
- Structured Checklists: Reusable templates with seed data for PSI, Legal, and Customs. Per-item pass/fail/NA results.
- Trade Document Verification: Invoice, packing list, B/L, and certificate completeness checks with discrepancy tracking.
- Certificate Management: CoC, Phytosanitary, Fumigation, COO, and Health certificates with expiry alerts.
- Cost Tracking: Agency fees, travel, and lab costs with manager approval workflow.
- Re-Inspection Chains: Parent–child inspection links for follow-up inspections after failures.
- Immutable Audit Trail: Pass/fail state locks all fields at the ORM level. Manager override only.
- Shipment Gate: Blocks customs clearance when inspection is pending or failed.
- OWL Dashboard: Pipeline state counters, activity metrics, and embedded kanban view.
- SQL Analytics: Performance-optimized report model for pivot tables and graph analysis.
Configuration
Installation
Install the module from the Odoo Apps menu or via the command line:
python odoo-bin -d <dbname> -i grev_od_purchase_trade_inspection
Ensure the following dependencies are installed:
- base
- purchase
- product
- stock
- uom
- grev_od_purchase_trade_logistics
Assign users to the appropriate security groups.
Important
This module works with both Odoo Community and Enterprise editions. No Enterprise-only features are required.
Security Groups
The module provides three-tier role-based access control:
| Group | Permissions |
|---|---|
| Trade Inspection User | Read-only access to inspections and reports |
| Trade Inspection Officer | Create, edit, and execute inspections |
| Trade Inspection Manager | Full CRUD including delete, manager overrides, and cost approvals |
Multi-company record rules are applied to all primary models.
Setting Up Inspection Agencies
- Go to :menuselection:`Purchase --> Trade Inspection --> Configuration --> Inspection Agencies`
- Click :guilabel:`Create`
- Fill in the agency details:
- Company Name: The inspection agency's legal name
- Accreditations: Select applicable accreditations
- Coverage Countries: Countries the agency can inspect in
- Cost Rates: Standard rates for different inspection types
- Click :guilabel:`Save`
Tip
Pre-configured accreditation types are loaded as seed data: ISO 17020, ISO 17025, PVOC, SONCAP, Phytosanitary, and more.
Configuring Checklist Templates
- Go to :menuselection:`Purchase --> Trade Inspection --> Configuration --> Checklist Templates`
- Click :guilabel:`Create`
- Select the inspection type (PSI, Legal, or Customs)
- Add checklist items with descriptions and expected criteria
- Click :guilabel:`Save`
Note
Seed checklist templates are provided for PSI, Legal, and Customs inspection types. These can be customized to match your organization's specific requirements.
Usage
Creating an Inspection Order
- Navigate to :menuselection:`Purchase --> Trade Inspection --> Inspections`
- Click :guilabel:`Create`
- Select the related Purchase Order
- Choose the inspection type:
- PSI: Buyer-requested quality verification
- Legal: Regulatory compliance (PVOC, SONCAP, etc.)
- Customs: Customs and border control
- Assign an inspection agency
- Set the scheduled date and location
- Optionally select a checklist template
- Click :guilabel:`Save`
Inspection Workflow
The inspection follows a structured state machine:
| State | Description |
|---|---|
| Draft | Initial state, inspection order created |
| Requested | Inspection formally requested from agency |
| Scheduled | Date and location confirmed by agency |
| In Progress | Inspector executing the inspection |
| Completed | Inspection finished, awaiting result decision |
| Passed | Inspection passed, shipment can proceed |
| Failed | Inspection failed, shipment blocked |
| Cancelled | Inspection cancelled |
Recording Inspection Results
- Open the inspection order
- Click :guilabel:`Start` to begin the inspection
- Complete checklist items with pass/fail/NA results
- Record findings for any non-conforming items
- After completion, set the result:
- Pass — all criteria met
- Fail — critical non-conformance found
- Conditional — minor issues, proceed with conditions
- Enter the certificate number and date if applicable
- Attach inspection photos and certificates
- Click :guilabel:`Pass` or :guilabel:`Fail` to finalize
Warning
Once an inspection is marked as Passed or Failed, all fields are locked. Only a Trade Inspection Manager can override the lock to make corrections.
Working with Certificates
- From an inspection order, go to the Certificates tab
- Click :guilabel:`Add a line`
- Select the certificate type:
- Certificate of Conformity (CoC)
- Phytosanitary Certificate
- Fumigation Certificate
- Certificate of Origin (COO)
- Health Certificate
- Enter the certificate number, issue date, and expiry date
- Attach the certificate document
- Click :guilabel:`Save`
Note
The system tracks certificate expiry dates. Expired certificates are flagged automatically in the dashboard.
Trade Document Verification
- From an inspection order, go to the Documents tab
- The system lists required trade documents:
- Commercial Invoice
- Packing List
- Bill of Lading
- Insurance Certificate
- Other required certificates
- Mark each document as verified or note discrepancies
- The doc_verification_complete flag updates automatically
Shipment Gate Control
When the Blocks Shipment flag is enabled on an inspection:
- The linked shipment cannot be released for customs clearance until the inspection passes
- Failed inspections require resolution (re-inspection or manager override) before the shipment can proceed
- The shipment gate status is visible on the trade logistics shipment form
Important
The shipment gate integrates with grev_od_purchase_trade_logistics. Ensure both modules are installed for full gate control functionality.
Cost Tracking
- From an inspection order, go to the Costs tab
- Click :guilabel:`Add a line`
- Enter cost details:
- Cost Type: Agency fee, travel, lab, or other
- Amount: Cost in the inspection currency
- Description: Brief cost description
- Costs exceeding approval thresholds require manager approval
- Total cost is computed automatically on the inspection header
Re-Inspections
When an inspection fails and a follow-up is required:
- Open the failed inspection
- Click :guilabel:`Create Re-Inspection`
- The system creates a new inspection linked to the parent
- Enter the re-inspection reason
- The re-inspection count updates on the parent record
Dashboard
The OWL Management Dashboard provides:
- Pipeline counters: Inspections by state (Draft, Requested, Scheduled, In Progress, Completed, Passed, Failed)
- Activity metrics: Overdue, due today, and upcoming inspections
- Embedded kanban: Filterable inspection cards
- Quick navigation: Click any counter to filter the list view
Access the dashboard from :menuselection:`Purchase --> Trade Inspection --> Dashboard`.
Technical Details
Models
| Model | Description |
|---|---|
| grev.purchase.trade.inspection | Core inspection order with workflow and results |
| grev.purchase.trade.inspection.agency | Inspection agency registry |
| grev.purchase.trade.inspection.accreditation | Agency accreditation types |
| grev.purchase.trade.inspection.line | Inspection line items (per product) |
| grev.purchase.trade.inspection.finding | Inspection findings and observations |
| grev.purchase.trade.inspection.checklist.template | Reusable checklist templates |
| grev.purchase.trade.inspection.checklist.template.item | Template checklist items |
| grev.purchase.trade.inspection.checklist.item | Inspection-specific checklist items |
| grev.purchase.trade.inspection.certificate | Trade inspection certificates |
| grev.purchase.trade.document.verification | Trade document verification records |
| grev.purchase.trade.inspection.cost | Inspection cost line items |
| grev.purchase.trade.inspection.report | SQL analytics view (_auto = False) |
Key Fields
Trade Inspection (grev.purchase.trade.inspection)
- name: Auto-generated inspection reference
- purchase_order_id: Link to purchase order
- partner_id: Supplier (computed from PO)
- inspection_type: PSI, Legal, or Customs
- state: Workflow state (8 states)
- inspection_agency_id: Third-party agency
- inspector_name: Inspector assigned
- inspection_date: Scheduled datetime
- origin_country_id: Country of origin
- destination_country_id: Destination country
- result: Pass, Fail, or Conditional
- blocks_shipment: Shipment gate flag (default: True)
- compliance_required: Compliance tracking flag
- checklist_progress: Checklist completion percentage
- total_cost: Sum of all inspection costs
- parent_inspection_id: Link to parent (re-inspections)
Workflow Actions
- action_request(): Move to Requested state
- action_schedule(): Move to Scheduled state
- action_start(): Move to In Progress state
- action_complete(): Move to Completed state
- action_pass(): Mark as Passed (locks record)
- action_fail(): Mark as Failed (locks record)
Integration Points
Upstream:
- grev_od_purchase_trade_logistics: Shipment schedules, documentation, and shipment gate control
Downstream (optional, via try/except):
- grev_od_purchase_compliance: Compliance check integration
- grev_od_purchase_quality_check: NCR propagation
- grev_od_purchase_landed_cost: Cost feed for landed cost
Odoo Core:
- purchase.order: Inspections linked to purchase orders
- res.partner: Supplier and agency management
- stock: Shipment blocking and release control
Troubleshooting
Inspection not linked to Purchase Order
Ensure a valid purchase order is selected. The supplier is automatically computed from the purchase order.
Cannot change state
Verify the user has the appropriate security group. Check that the current state allows the requested transition.
Fields locked after Pass/Fail
This is by design. The immutable audit trail prevents edits after finalization. A Trade Inspection Manager can override the lock.
Shipment not blocked
Confirm the Blocks Shipment field is enabled on the inspection. Verify the inspection state is not yet Passed.
Checklist items not loading
Ensure a checklist template is selected on the inspection order. Click :guilabel:`Load Checklist` to populate items from the template.
Agency not appearing in selection
Ensure the partner record for the agency is marked as a company (is_company = True) and has an active agency record.
Certificate expiry not triggering alerts
Check that the certificate has a valid expiry date set. Alerts are generated based on the expiry date field.
See Also
- :doc:`../grev_od_purchase_trade_logistics/doc/index` — Trade logistics and shipment management
- :doc:`../grev_od_purchase_quality_check/doc/index` — Quality check and NCR management
- :doc:`../grev_od_purchase_compliance/doc/index` — Enterprise compliance platform
- :doc:`../grev_od_purchase_landed_cost/doc/index` — Landed cost modeling and simulation
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module