When creating a MO with some WO from a mobile, the quality checks are
not created
To reproduce the issue:
(Need quality_control)
1. Create two storable products P_compo, P_finished
2. Create a BoM:
- Product: P_finished
- Components: 1 x P_compo
- Operations: create a new operation OP
3. Add a step to OP:
- Type: Pass - Fail
4. Switch into mobile mode
5. Create a MO for 1 x P_finished
6. Confirm it
7. Open the WO
Error: the tablet view skipped the pass-fail step, the user can already
mark the MO as done and close it
When confirming the MO, it leads to the quality checks creation. To do
so, we iterate on the `quality_point_ids` of the WO to generate these
quality checks:
https://github.com/odoo/enterprise/blob/7ff0f43df777027bf8544be3ac95e76feb7da957/mrp_workorder/models/mrp_workorder.py#L406
But, the WO has not any quality point, which is incorrect: it should
have the one related to the step created on the operation P. This field
is a computed one and is based on the quality points defined on the
operation linked to the WO:
https://github.com/odoo/enterprise/blob/7ff0f43df777027bf8544be3ac95e76feb7da957/mrp_workorder/models/mrp_workorder.py#L70-L73
But again, there is an issue: the WO has not any defined operation
(which is incorrect, it should be linked to OP). And this is because of
the WO creation from the kanban view: the field `operation_id` is
missing so it is not defined during the WO creation.
OPW-2984037
closes odoo/odoo#101346
X-original-commit: 751f1253d4a32491d210aceb4767084088c314ad
Signed-off-by: Adrien Widart <awt@odoo.com>
Odoo Manufacturing Resource Planning
Manage Bill of Materials, plan manufacturing orders, track work orders with the Odoo Open Source MRP app.
Get all your assembly or manufacturing operations managed by Odoo. Schedule manufacturing orders and work orders automatically. Review the proposed planning with the smart kanban and gantt views. Use the advanced analytics features to detect bottleneck in resources capacities and inventory locations.
Schedule Manufacturing Orders Efficiently
Get manufacturing orders and work orders scheduled automatically based on your procurement rules, quantities forecasted and dependent demand (demand for this part based on another part consuming it).
Define Flexible Master Data
Get the flexibility to create multi-level bill of materials, optional routing, version changes and phantom bill of materials. You can use BoM for kits or for manufacturing orders.
Get Flexibility In All Operations
Edit manually all proposed operations at any level of the progress. With Odoo, you will not be frustrated by a rigid system.
Schedule Work Orders
Check resources capacities and fix bottlenecks. Define routings and plan the working time and capacity of your resources. Quickly identify resource requirements and bottlenecks to ensure your production meets your delivery schedule dates.
A Productive User Interface
Organize manufacturing orders and work orders the way you like it. Process next orders from the list view, control in the calendar view and edit the proposed schedule in the Gantt view.
Inventory & Manufacturing Analytics
Track the evolution of the stock value, according to the level of manufacturing activities as they progress in the transformation process.
Fully Integrated with Operations
Get your manufacturing resource planning accurate with it's full integration with sales and purchases apps. The accounting integration allows real time accounting valuation and deeper reporting on costs and revenues on your manufacturing operations.