Take in account the bom consumption of subcontracting BoM:
- In flexible and warning we can now record extra component
(even if there isn't tracked component).
- In the warning case, we get a warning issue in during the recording
of component if we consume more than expected
- In case of script consumption, we cannot record component expected
if some are tracked. In this case we can consume more than expected
only if the user is a mrp manager.
Also fix "Set quantities" Button for the subcontracting
task-2486811
closesodoo/odoo#75041
Related: odoo/enterprise#20350
Related: odoo/upgrade#2750
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Replace wrong usages of any(list|recordset), by any(generator)
to speed up computations, avoiding list creations and/or looping twice on a recordset
for nothing.
any([generator]) => any(generator)
any(filtered) => any(generator)
closesodoo/odoo#55768
Related: odoo/enterprise#12360
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
After the odoo/odoo#52949 , the registering of tracked component,
in case of subcontracting, was broken. Fix and try to mimic
the same flow than before. The produce wizard has been replaced
by a clean MO form to register component and use backorder mechanisme
of MO to manage tracked finished product + tracked component.
task-2278147
closesodoo/odoo#54994
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
In a barcode environemtn or a situation with a lot of stock.move.line
the subcontract is hard to use with record components because a line is
created each time the produce wizard is proccessed. Then each line is
duplicate, one with reservation and the other with effective transfer.
This commit try to merge them in order to limit the number of lines.
Task 2073383
closesodoo/odoo#38689
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Usecase:
- Set details operations on picking type
- Create a receipt for a subcontracted product with tracked components
- Records production
- Go to details operations
The move line is created however the lot name is invisible.
It happens due to produce_wizard line creation. It will set the lot_id
but the field lot_id is invisible if the picking type use the option
'use_create_lot' and uncheck 'use_exisiting_lot'
In order to fix it set both lot_name and lot_id after the produce
operation.
Before this commit a returns would select the classic
partner location. However in the case of a subcontractor return
it should be returned to the subcontract location
- nothing tracked
The "register components" button shouldn't appear, the receipt looks normal.
- finished products tracked
The "register components" button shouldn't appear, the receipt looks normal.
- finished products not tracked and components tracked
The "register components" button appear and the burger redirects to "Produce" wizard. The user should record all the productions before being able to access SML through the burger wizard. He cannot force any SML for subcontracted products with tracked components before having recorded all the productions.
- finished products and components tracked
The "register components" button appear and the burger redirects to "Produce" wizard. The user should record all the productions before being able to access SML through the burger wizard. He cannot force any SML for subcontracted products with tracked components before having recorded all the productions.
Currently, the subcontract picking present multiple difficulties:
- The user has to introduce multiple time the lot produced.
In register components button and then create a new move line with
the show details operation button.
- Same problem with the correction system. The user has to modify the
lot in details operation and then go on the subcontract production and
unlock and edit it.
In order to facilitate those behavior. A move line will be automaticaly
created during the register components process. Also the subcontract
moves for components will be available in the detail operations tab.