[16.0][IMP] quality_control_oca, quality_control_stock_oca
Before this commit, the QC inspection was only triggered when the picking was already done. So, users could check the QC inspection only after the done state.
With this commit, the QC inspection can be triggered with three options ("Before", "Plan Ahead", and "After"). This allows the QC inspection to be triggered both when the picking is in progress and when it is done, enabling users to check the quality at any stage.
This PR does following:
- Add date_done field in
qc.inspection- Update date_done when status is success or fail
- Clear date_done when status is reset to draft
- Update form and list views to show date, and date_done
- Add date and date_done fields in the search filter
- Add the timing field in the QC trigger line to enable
- When timing is 'After', an inspection is generated when a picking with the trigger is done.
- When timing is 'Before', an inspection is generated for each related move when a picking with the trigger is confirmed.
- When timing is 'Plan Ahead', a 'Plan' inspection is generated for each related move when a picking with the trigger is confirmed. A plan inspection is just a plan, and cannot be updated except for the date. A plan inspection gets converted into an executable inspection once the picking is done.
@qrtl QT4613
This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
@OCA-manufacture-maintainer Could you please review this improvement PR?
Hey @ChrisOForgeFlow and @JordiBForgeFlow,
this will also fix https://github.com/OCA/manufacture/issues/1297 and https://github.com/OCA/manufacture/issues/1396.
Can you may take a look? :)
Not directly related to this PR but touches some points mentioned below.
From a quick look, this seems ok. However, I would suggest a refactoring at point to replace timing in trigger lines with a model and domain field.
Since each model probably has different states, it would be far more useful to be able to set triggers to go off with criteria set by the users (much like automated actions).
That would also allow to decouple trigger refs in code and make it more generic (eg, triggering a qc from a manufacturing order, picking return, even a helpdesk (or claim) request)
What do you think?
Let's merge this one, it has enough approvals and test coverage
/ocabot merge minor
@AungKoKoLin1997 could you take care of moving the improvements to future versions?
This PR looks fantastic, let's merge it! Prepared branch 16.0-ocabot-merge-pr-1278-by-LoisRForgeFlow-bump-minor, awaiting test results.
It looks like something changed on 16.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 16.0-ocabot-merge-pr-1278-by-LoisRForgeFlow-bump-minor, awaiting test results.
It looks like something changed on 16.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 16.0-ocabot-merge-pr-1278-by-LoisRForgeFlow-bump-minor, awaiting test results.
Congratulations, your PR was merged at 39014af430cf0589e28bdecfecf0173521ebb080. Thanks a lot for contributing to OCA. ❤️