This commit contains the core of the new MRP. It contains a whole refactoring of the MRP application, with improved and new features, written in new API. Among other here are the main manufacturing workflow improvements : - Picking type not only for pickings but also for manufacturing orders - Properties replaced by picking type - BoM can only be produced with its routing (no other) - Either produce without routing with only production orders, or produce with routing - By default, there is an order in the work orders (serially), but you can override it to be able to work in parallel - Time clocking on work orders and block time on work centers with reporting on OEE, performance, losses, ... - Real-time adaptation of timings on operations - Lots/serial numbers can be inputted like in the pickings on manufacturing orders. It is also possible to input them in the work orders. - Material availability independent of production order state (possibility to start production when only part of it is there) - Work sheets on work orders - Put messages on work orders to make your workers pay attention to something - Full traceability link to see for each produced piece of stock, the consumed pieces, ... - Separate scrap object (a scrap is not done based on an original move anymore) - Separate unbuild system (if you want to unbuild into its original components) Thanks to all people that helped during this development, notably but not limited to Chirag A Dodiya (cod@odoo.com), Gaurav Panchal (gan@odoo.com), Jignesh Rathod (jir@odoo.com), Mansi Trivedi (mtr@odoo.com), Pariket Trivedi (ptr@odoo.com).
13 lines
903 B
YAML
13 lines
903 B
YAML
-
|
|
!python {model: ir.model.data}: |
|
|
warehouse = self.pool['stock.warehouse'].browse(cr, uid, ref('stock.warehouse0'), context=context)
|
|
#create xml ids for demo data that are widely used in tests or in other codes, for more convenience
|
|
xml_references = [
|
|
{'name':'picking_type_manufacturing','module':'mrp', 'model':'stock.picking.type','res_id': warehouse.manu_type_id.id},
|
|
]
|
|
for xml_record in xml_references:
|
|
xml_ids = self.search(cr, uid, [('module', '=', xml_record['module']), ('model', '=', xml_record['model']), ('name', '=', xml_record['name'])], context=context)
|
|
if not xml_ids:
|
|
self.create(cr, uid, xml_record, context=context)
|
|
#avoid the xml id and the associated resource being dropped by the orm by manually making a hit on it
|
|
self._update_dummy(cr, uid, xml_record['model'], xml_record['module'], xml_record['name']) |