| 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 | 6033 |
| Technical Name |
grev_od_commodity_quality |
| 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 | 6033 |
| Technical Name |
grev_od_commodity_quality |
| License | OPL-1 |
| Website | https://www.grevlin.com |
🔬 Commodity Quality InspectionLaboratory Quality Testing, Automatic Grading, Penalty Computation & Certificate Issuance for Commodity Deliveries
|
|
|
|
|
|
📞 Need Help?
|
|
Grevlin Procurement Suite Enterprise-Grade Commodity Procurement for Odoo © 2026 Grevlin Global Corp. All Rights Reserved. Compatible with Odoo 19.0 | Licensed under OPL-1 |
Commodity Quality Inspection
The Commodity Quality Inspection module provides laboratory-grade quality testing for commodity deliveries. It automates the full inspection workflow from sample collection through test execution, automatic grading, penalty computation, and certificate issuance --- all with immutable records once verified.
Overview
This module sits in the commodity procurement pipeline between delivery intake and settlement. Lab technicians record test results against commodity-specific quality parameters; the system automatically grades the delivery, computes penalties for out-of-spec parameters, and produces formal quality certificates.
Key Capabilities
- Quality Test Lifecycle --- structured workflow from draft through in progress, completed, and verified states.
- Automatic Test Initialization --- one-click start populates result lines from the commodity type's quality parameters.
- Threshold-Based Accept/Reject --- any parameter exceeding its reject threshold triggers automatic rejection.
- Automatic Grading --- quality score (% of parameters within spec) matched against commodity grade thresholds.
- Per-Parameter Penalty Computation --- deviation above max value multiplied by penalty-per-unit for each result line.
- Quality Certificates --- formal certificates issued from verified tests with unique numbering and revocation workflow.
- Sample Management --- chain of custody tracking for primary, duplicate, referee, and retention samples.
- Supplier Quality Scorecard --- SQL-backed analytics view with acceptance rates and averages per supplier and commodity.
- Immutable Records --- verified tests and issued certificates are locked at ORM level; only managers can override.
Note
This module uses centralized security groups from grev_od_commodity_base. It does not define its own groups.
Configuration
Quality Parameters
Quality parameters are defined in the Commodity Base module on each commodity type. Before using quality tests, ensure parameters are configured.
- Go to :menuselection:`Commodity --> Configuration --> Commodity Types`.
- Select the commodity type (e.g., Maize, Wheat).
- In the :guilabel:`Quality Parameters` tab, add parameters such as moisture, foreign_matter, broken_grains, protein.
- For each parameter, set :guilabel:`Max Value`, :guilabel:`Reject Threshold`, and :guilabel:`Penalty per Unit`.
- Click :guilabel:`Save`.
Important
Parameters must have a code field matching the expected values (moisture, foreign_matter, broken_grains, protein) for the convenience fields on the quality test to populate correctly.
Grades
Grades determine the quality classification of accepted deliveries.
- Go to :menuselection:`Commodity --> Configuration --> Grades`.
- Create grades for each commodity type (e.g., Grade 1, Grade 2).
- Set :guilabel:`Min Quality Score` for each grade.
- Set :guilabel:`Sequence` to control evaluation order (lowest sequence = highest grade, checked first).
- Mark one grade as :guilabel:`Is Accepted` = False for rejected deliveries.
Security Groups
The module uses the centralized three-tier security groups from grev_od_commodity_base:
Commodity User (group_commodity_user)
- Read-only access to quality tests, results, certificates, samples, and the quality scorecard.
- Cannot create or modify records.
Commodity Officer (group_commodity_officer)
- Create and edit quality tests, result lines, samples, and certificates.
- Cannot delete records.
- Inherits Commodity User permissions.
Commodity Manager (group_commodity_manager)
- Full CRUD including delete on all quality models.
- Can modify verified test records (override immutability).
- Can revoke issued certificates.
- Inherits Commodity Officer permissions.
Note
Multi-company record rules apply to all models using the pattern ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)].
Usage
Creating a Quality Test
- Navigate to :menuselection:`Commodity --> Quality --> Quality Tests`.
- Click :guilabel:`Create`.
- Fill in the required fields:
- :guilabel:`Commodity` --- the commodity type being tested.
- :guilabel:`Supplier` --- the supplier delivering the commodity.
- :guilabel:`Lab Technician` --- defaults to the current user.
- Click :guilabel:`Start Test` to move to In Progress and auto-populate result lines from the commodity's quality parameters.
Recording Test Results
- In the :guilabel:`Test Results` tab, enter the :guilabel:`Measured Value` for each parameter.
- The system automatically computes:
- :guilabel:`Within Spec` --- whether the value is at or below the parameter's max value.
- :guilabel:`Deviation` --- amount above max value (zero if within spec).
- :guilabel:`Penalty Amount` --- deviation multiplied by the parameter's penalty-per-unit rate.
- Click :guilabel:`Complete` to finalize the test.
Tip
The overall result (accepted/rejected) and grade are computed automatically when completing the test. If any parameter exceeds its reject threshold, the delivery is rejected.
Verifying and Issuing Certificates
- After completion, a manager reviews the test and clicks :guilabel:`Verify` to lock the record.
- Click :guilabel:`Issue Certificate` to create a formal quality certificate linked to the verified test.
- The certificate includes the overall result, grade, and a summary of all parameter values with spec compliance status.
Warning
Once a certificate is issued, it becomes immutable. To make changes, the certificate must first be revoked (with a mandatory reason), and a new certificate issued.
Managing Samples
- From a quality test, click the :guilabel:`Samples` smart button.
- Click :guilabel:`Create` to register a new sample.
- Set the :guilabel:`Sample Type`:
- Primary --- main test sample.
- Duplicate --- backup sample for re-testing.
- Referee --- independent verification sample.
- Retention --- stored sample for future disputes.
- Track the sample through its lifecycle: :guilabel:`Send to Lab` |rarr| :guilabel:`Mark Tested` |rarr| :guilabel:`Retain` or :guilabel:`Dispose`.
Note
Retention samples require a :guilabel:`Retain Until` date before they can be marked as retained.
Reviewing the Supplier Scorecard
- Navigate to :menuselection:`Commodity --> Quality --> Quality Scorecard`.
- The scorecard shows aggregated quality metrics per supplier and commodity: total deliveries, accepted/rejected counts, acceptance rate, average moisture, average foreign matter, and average quality score.
- Use the pivot and graph views for deeper analysis.
Technical Details
Data Model
| Model | Type | Description |
|---|---|---|
| grev.commodity.quality.test | Model + mail.thread | Core quality test record with lifecycle and grading. |
| grev.commodity.quality.result | Model | Per-parameter test result lines with spec check and penalty. |
| grev.commodity.quality.certificate | Model + mail.thread | Quality certificate with issuance and revocation workflow. |
| grev.commodity.quality.sample | Model + mail.thread | Sample chain of custody tracking. |
| grev.commodity.quality.scorecard | SQL view | Supplier quality analytics (pivot + graph). |
Immutability Enforcement
Two models enforce immutability via write() overrides:
- grev.commodity.quality.test
- Once in verified state, only chatter-related fields can be modified. Only users in group_commodity_manager can bypass this restriction.
- grev.commodity.quality.certificate
- Once in issued state, only state and revocation_reason fields can be modified (to support the revocation workflow).
Integrations
Upstream --- Receives commodity_type_id and quality parameter definitions from grev_od_commodity_base.
Downstream --- Penalty amounts on result lines are consumed by grev_od_commodity_settlement for automatic deductions during settlement pricing.
Troubleshooting
No Result Lines After Starting Test
Symptom: Clicking :guilabel:`Start Test` moves the test to In Progress but no result lines appear.
Checks:
- Verify the selected commodity type has quality parameters defined in :menuselection:`Commodity --> Configuration --> Commodity Types`.
- Confirm the parameters have valid code values.
Grade Not Assigned After Completion
Symptom: The test completes but :guilabel:`Grade` remains empty.
Checks:
- Verify grades are defined for the commodity type with :guilabel:`Min Quality Score` thresholds.
- For accepted deliveries, confirm at least one grade has is_accepted = True and a score threshold at or below the computed quality score.
- For rejected deliveries, confirm a grade with is_accepted = False exists for the commodity type.
Cannot Modify Verified Test
Symptom: Editing a verified test raises an error.
Resolution: This is expected behavior. Only users in the Commodity Manager group can modify verified tests. Contact your system administrator to request manager access if modifications are needed.
See Also
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