'Finds the bill of material for the product from procurement order.'

@api.multi
def _get_matching_bom(self):

    if self.bom_id:
        return self.bom_id
    return self.env['mrp.bom'].with_context(company_id=self.company_id.id, force_company=self.company_id.id)._bom_find(product=self.product_id, picking_type=self.rule_id.picking_type_id)
