Just define it like:
<button name="open_report_consume" type="object" string="Report Consume"/>
def open_report_consume(self, cr, uid, ids, context=None):
if ids:
if not isinstance(ids, list):
ids = [ids]
context = dict(context or {}, active_ids=ids, active_model=self._name)
return {
'type': 'ir.actions.report.xml',
'report_name': 'mrp.products_consume_document',
'context': context,
}
You need to change the report model to match the model 'mrp.production.products' of the field 'products_ids', because that model is where the button is defined. Change it like:
<report id="action_products_consume_report" string="Products" model="mrp.production.products" report_type="qweb-pdf" file="mrp.products_consume_document" name="mrp.products_consume_document" />
Also you need to use the fields at the report template from 'mrp.production.products' if you don't have it like that