Check Products Quality


(Sergi Almacellas Abellana) #1

Rational

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.

Proposal

Add model named Quality control with the following fields:

  • Name:
  • Active:
  • 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).

Implementation


#2

So a kind of quality lot?
It should be linked to the batch of a material (if exists).
What happens with the production lot until the quality examination is finalized? Is it blocked or free for use?


(Cédric Krier) #3

I think what you describe is usually called “Quality Inspection” and is probably part of a larger “Quality” area (instead of limited to Stock). At least it applies also to Production orders.

I think it can be applied to more operation like on: customer shipment, internal shipment, work order etc.

You do not define what happens with the result. It seems logical that when it is valid, you can perform the operation but if it is not valid what happens?

Does it really requires to use PYSON? In the rational you define only 3 tests which could be implemented without the usage of PYSON. I think it will make the UX better as it is non-technical users who will have to create those tests.

Is it not better to use a Dict field? As potentially you can have a lot of values to collect, you will have a better UI is they are presented as a standard form.

It is missing a Failure state.
I think only a specific group can cancel an inspection.
I do not see the point of having a draft state. For me, inspection will be created automatically and will not require adjustment or validation.

I do not think it is the right criteria. For me, the inspection should be based on the document like shipment or work order (maybe also production order).
Also I think it should mainly based on the template/product criteria.

I think it should be based on a frequency. Often you do not have the time to check everything but you perform random inspections (of course user could put 100% to always have one).

But what happens to the document triggering it? I think it should be blocked in state until inspection is finished (and maybe succeeded).


(Jan Grasnick) #4

Hi,
I have a older module http://repos.gewinnmonitor.de/LZR/quality which uses also test templates, possible qualitative and quantitative values and related equipment. It is now related to project.work but I agree that it could be related to any kind of model. Unfortunately it has fields only valid for coating industries but I think without that it could be a starting point.


(Sergi Almacellas Abellana) #5

We have the use case where some of the lines may contain invalid values but the operation is always performed. Instead of blocking the operation what is done is to apply some rebate on the price.

That makes me think that blocking should be part of an extra module.

I agree that for the UX it’s better to use a Dict field and thought about that but I was more worried about keeping the relation between the entered values and the valid values. How will be able to define the 3 tests (a concrete value, a list of values and a range of values) on a dict field?

Ok, I updated the description.

In this case what happens when receiving different products on the same shipment that have to pass different Quality Inspection? There is not direct relation between the inspected product and the inspection

Also when using lots, you want to know on which exact lot you applied the quality inspection.

Ok, so on the product template we can specify the Quality Control and the frequency when it has to be performed.


(Sergi Almacellas Abellana) #6

Don’t understand what do you mean. Our proposal is to link the quality control with the stock move (but use a reference field in case people want’s to use other models), so it is linked with all the received products and if the move has a lot, it’s also linked with this lot.

We did not consider blocking as we have use cases where there is no blocking. But as I see that there is a common need on it, I propose to add a boolean field on product template to indicate if the quality control should block.


(Cédric Krier) #7

This is done with the key of the dictionary.

I’m not sure to understand the question. But there are different types for dict values and if necessary the dictionary field can be improved.

Nothing prevent that inspections are created from the document workflow for each products involved.

You can create inspection for each lot involved.

But the important point for me, it is that the workflow of document should trigger inspection and not the low level move.


(Sergi Almacellas Abellana) #8

Ok, so lets go with the dict field.

I see one improvement here, but probably only related to quality inspections. As all the keys of the dict field are optional, we should allow to define which values are required in order to finish the quality control.

Ok, I understand your point. So it makes sense to trigger the actions on document level.


(Cédric Krier) #9

I think we could implement a domain constraint on the value of the dictionary: https://bugs.tryton.org/issue7199

I do not think it will require to be managed by the Dict widget but a domain can make invalid an empty value (see https://bugs.tryton.org/issue4268). So this will need to be enforced on the server side.