'Returns all ir.attachments associated to a bundle, regardless of the verion.'

def _any_ira_for_bundle(self, type):

    bundle = (self.jsbundle_xmlid if (type == 'js') else self.cssbundle_xmlid)
    return self.env['ir.attachment'].search([('url', '=like', '/web/content/%-%/{0}%.{1}'.format(bundle, type))])
