When receiving (and also after production) some kind of products there is the need to perform some checking on the goods received to ensure if they meet the quality requirements required for the product to be used.
The check is a list of questions which are replied with a text or with a numeric value. This value is compared against a formula to determine if it’s valid. Some examples of formulas are:
- Value is in a list of valid values
- The numeric values is between a range of numbers
- Value is exactly one value
The list of question is predefined. The same list can be used for one product or for a set of products.
Add model named Quality control with the following fields:
- Controls: A DicthSchemaMixin used to define fields with the list of questions that will be applied for this control.
Add model named Quality Inspection with the following fields:
- Number: Used to identify the test
- Date: When the check is performed
- Employee: The employee responsible of the test
- Control: A Many2One to the quality control module.
- Values: A dict fields with the values of this control.
- Origin: A reference field to indicate where the check is being done. (By default it will only accept stock moves or productions if the production module is installed)
- State: Requested/In-Progress/Passed/Failed/Cancelled: Only special group is allowed to cancel.
The product will be extended to include a the Quality Control which should pass and a Frequency to indicate when it should be performed (in case not all the products are tested). A boolean field Blocking will be also be used to indicate that the Quality Inspection should block the origin.
When receiving products for this product a new quality test in request state will be created. The test will be in request state and it’s origin will be the stock move that triggered it.
If the product has the blocking flag it won’t be possible to finish the supplier shipment related to the move (if any) until all the quality inspections have been finished (done or failed).
For production, the inspection will be created when running it (if the produced product has a qualityt control) and if blocking it wont be possible to finish it until the quality inspection is finished (done or failed).