Pieter Claeys (clpi) 71bc97c19b [FIX] mrp: Preserve component registration steps on backorder creation
Impacted versions: 15.0

Steps to reproduce (starting from ENTERPRISE 15.2):
- enable Work Orders
- create new BoM for a new product
- add 1 operation w/ 1 step (e.g. Instructions)
- add 1 component to BoM with operation_id (Consumed in Operation) = the operation
- Create and confirm a MO with new BoM + 2 Quantity to Produce
- Produce 1 product via the tablet view flow (i.e. complete instruction step + Validate 1 component in "Register Consumed Materials" step + Mark As Done)

Current behaviour:
Backorder is correctly created, but its workorder is missing the "Register Consumed Materials" step

Expected behaviour:
Step is correctly created

Note: same issue occurs with Byproducts having an operation_id (i.e. "Produced in Operation")

Issue is due to when _split_productions() first creates the backorders, they are created without move_raw_ids and move_finished_ids (see: _get_backorder_mo_vals()). When the backorders are created, they auto-create and auto-confirm their workorders. Since a quality point (e.g. operation step) exists for the workorder, the initial _action_confirm will _create_checks() for the quality point, but the "Register Consumed Materials" steps are created by the operation_id values in the move_raw_ids and move_finished_ids which haven't been set yet. This makes it so when the second _action_confirm() is called on the workorders (i.e. after their moves have been set) at the end of _split_productions(), the _create_checks() will be skipped because it assumes all the quality points have been created since one already exists.

Task: 2800975
Community PR: https://github.com/odoo/odoo/pull/87681
Enterprise PR: https://github.com/odoo/enterprise/pull/26437

closes odoo/odoo#89486

X-original-commit: 67524eb948b7e122f33abf344b28b59bd81eb88d
Related: odoo/enterprise#26534
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-04-25 10:27:51 +02:00
2022-04-23 07:37:55 +02:00
…
…
…
2021-10-07 17:59:53 +00:00
2022-01-14 15:44:52 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%