[FIX] mrp: solve bom structures views
authorSimon Lejeune <sle@openerp.com>
Fri, 26 Sep 2014 14:12:02 +0000 (16:12 +0200)
committerJosse Colpaert <jco@odoo.com>
Tue, 30 Sep 2014 08:31:33 +0000 (10:31 +0200)
commit68c8d902218d97a16fdbf3cd35c1d33f5a1e6c88
treee5464fa553724582059ea1e595017807a897cefb
parent25d2ed6d4b8b52520b57c9a0202a06555e796c5c
[FIX] mrp: solve bom structures views

A previous refactoring brought a bom_line_ids field on the mrp.bom, thus
deprecating the _child_compute method. But the previous refactoring did
not go through all the views, breaking everything that relied on the
_child_compute (tree view, report). As the bom_line_ids refers to the
mrp.bom.line model (introduced by this previous refactoring, note:
_child_compute returned mrp.bom record) and that we can't make a treeview
showing different model, this patch introduce a function field _get_child_bom_lines
on the mrp.line model, allowing to go through the bom_line_ids of a mrp.bom.line
if this mrp.bom.line refers to a mrp.bom.

[IMP] Rename bom_line_ids to child_line_ids in mrp_bom_line to avoid confusion
addons/mrp/mrp.py
addons/mrp/mrp_view.xml
addons/mrp/report/bom_structure.py
addons/mrp/views/report_mrpbomstructure.xml