OpenMRP code refactoring
OpenMRP code need to be refactored, because lots of code is copied and not reused. This makes the code bloated and hard to manage. This will also reduce complexity and make room for future improvement.
For example [mrp_master_
-------
if not operation.
final_
'bom_id': operation.
})
final_
else:
found = 0
for final_product in operation.
if final_product.
found = 1
if found == 0:
if not location_ids:
raise osv.except_
})
-------
Could be rewritten into:
-------
final_product_id = final_product_
'mrp_
'bom_id': operation.
'product_id': my_product,
'product_qty': qty,
'product_uom': product.uom_id.id,
'location_id': location_ids[0]
})
found = 0
if operation.
for final_product in operation.
if final_product.
found = 1
if found == 0:
final_
-------
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Daniel Stenlöv
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Work Items
Work items:
mrp_advanced_
mrp_analytics_
mrp_manufacturi
mrp_phantom_ext: TODO
mrp_sequence_
mrp_advanced_
mrp_automatic_
mrp_master_
mrp_production_
mrp_super_