When a final product move line is shown in the traceability report is
displayed, the reference to the MO is not displayed because the finish
products move lines don't have any productio_id on it.
So to fix this we take the production_id of the move_id when it's a
finished product, and the raw_material_production_id of the move_id when
it's a consumed product that are always set.
TASK-ID: 1873101
- Optimized _lines() to fold/unfold mechanism and use stock move line in get lines.
- Merged into single method (make_dict_move and make_dict_head) to get parent & child traceability result
and use unfolfable to make line unfoldable.
- Removed _get_produced_or_consumed_vals method and move mechanisam into _line method will do same for this.
- Make some methods private.
- Removed useless vals from dict.
- When unfold down MO, Repair Order, Unbuild Order to display produced or consumed materials even product is trackable or not.
- Normal products(not trackable) are directly displayed with source and destination not foldable.
- Unfoldable line has no caret icon to unfold, so move it to margin-left 15px to make parellel.
- Invisible source and destination location on head lines if product trackable.