Commit Graph
5 Commits
Author SHA1 Message Date
Arnold Moyaux c8c30b0743 [FIX] mrp, mrp_subcontracting: traceback during unistall
The unlink fail in __init__.py uninstall hook is managed, however
when it fail, the error is catch but the cursor is not rollback and
do not accept additional transaction. That result in a traceback at
uninstall.

opw-2453939

closes odoo/odoo#66309

X-original-commit: 66d9dce9b6e6e65000ba0b62efcb153f2d3eec15
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-02-16 18:33:27 +00:00
Nicolas Martinelli 0d16e7331c [FIX] mrp, mrp_subcontracting: clean-up routes at uninstall
When `mrp` or `mrp_subcontracting` are uninstalled, the routes used as
'Picking Before Manufacturing Route' and 'Resupply Subcontractor' are
kept active. When the modules are re-installed, the routes are created
again, and appear duplicated.

The routes should be deleted if they are not used anywhere else.

opw-2222895

closes odoo/odoo#48206

X-original-commit: ce219b8375dc14daf9d380433d254b622a947773
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-23 14:18:10 +00:00
Arnold Moyaux 37200abfc5 [REF] mrp_subcontracting: lot produced/consumed management
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.
2019-08-19 15:03:59 +00:00
Arnold Moyaux 6c09ffb634 [FIX] mrp_subcontracting: remove hook
The hook only generate a useless rule. It has been already
generated in stock_warehouse.py. Also remove the hook method
and add it in data file.
2019-08-19 14:14:13 +00:00
Simon Lejeune d91db5bde6 [ADD] mrp_subcontracting
In a few words, it allows to send components to a subcontractor partner
and receive a finished product. The production is managed through classical
manufacturing orders where the raw and finished location is the
subcontracting location. When creating a receipt picking for a
subcontractor partner, the location_id of the moves will be set to the
subcontracting locations by using the property_stock_customer and
property_stock_supplier of the partner. An override of _action_confirm
will create the manufacturing order.

When a subcontracted bom contains tracking, the produce wizard is
available from the picking to record which lots were produced/consumed.

New type on the BoM: subcontract
New type on res.partner: subcontactor
New location per company (we still own the components stored at the
subcontractor so they're still valued)
New routes created to resupply the subcontracting location on order or
not (through a reordering rule).
Override of res.partner to set the property_stock_customer/supplier on
subcontactor partners.

Proper tests were added too.

Joint work with: Arnaud Baes <arb@odoo.com>

task 1831382
2019-04-03 13:52:22 +00:00