Relative Content

Tag Archive for qwebodoo-17

How to add field to Odoo QWeb BoM report

I’ve created an addon that inherits from mrp.bom and added a barcode field which relates to product_tmpl.barcode and it displays numbers. I can add that field just fine to the tree and form views for mrp.bom, but when it comes to displaying it in the mrp.report_mrp_bom or report_mrp_bom_pdf_line view, I fail. I can add in the column name, just not the values for each component line in the BoM.
I’ve noticed a .py file in mrp/report/ named something like mrp_report_bom_structure.py that has a class with loads of different methods inside to get things like pdf line data, bom data, component data, etc. Do I need to somehow inherit from that class and methods? I’ve not found any documentation for Odoo on inheriting methods.
If anyone is familiar with any of this, all I need is to be able to add a single field into the report that shows the barcode number for the BoM itself and all of its components and sub-components.