I'm trying to edit the RML report of the Delivery Order ( /addons/delivery/report/shipping.rml) so that it displays not only the finished products, but also the detailed list of the products that were consumed in the Manufacturing Order and their associated serial numbers.
I understand that in order to do so, I need to access the consumed products list (mrp_production.move_lines2) of the Manufacturing Order associated to the Delivery Order. And I thought I could do that by doing the following :
- One loop to iterate on the move lines of the Delivery Order : [[repeatIn(o.move_lines, 'do_line')]]
- Another loop to iterate on the consumed products list : [[repeatIn(do_line.production_id.move_lines2, 'mo_lines')]]
However, it seems like the production_id field associated to my stock_move (do_line) is empty. When I try to print on the report [[do_line.sale_line_id]], it prints "browse_record(sale.order.line, 1)", which makes sense. When I try to print on the report [[do_line.production_id]] it doesn't print anything.
When I check the online documentation (http://useopenerp.com/v8/model/stock-move#columns-product_id), it tells me that the production_id field is a "column extended with add-on mrp > stock.py > class StockMove". I however do believe that I have the mrp module installed, since I can manage my Manufacturing Orders and since I can find the file /addons/mrp/stock.py.
Can someone please help me with this matter? I'd be forever grateful :-)