Skip to Content
Menu
This question has been flagged
1 Reply
1960 Views

Hello,

  I need to generate BOM reports not at bills of materials page, but at the operations one. Ideally I have to have another option added to print on that page. Is this possible? And if yes how to do it?)


Thank you in advance!

Avatar
Discard
Best Answer

Hi,

If you need to print the BOM Structure report from the manufacturing order screen, what you have to do is that, first of all you can inherit corresponding view and add this button to print the report,

<button name="action_print_bom" string="Print BOM" type="object" class="oe_highlight"/>


Then inherit the corresponding model, ie, mrp.production and add this function,

def action_print_bom(self):
return self.env.ref('mrp.action_report_bom_structure') \
.with_context(discard_logo_check=True).report_action(self.bom_id)


Thanks

Avatar
Discard