parameters: (self)
return_statement: return [name for name in addons_list if name not in to_remove]
docstring: Overridden to discard inactive themes.
docstring_summary: Overridden to discard inactive themes.
docstring_tokens: Overridden to discard inactive themes .
function: def _get_active_addons_list(self):
          """Overridden to discard inactive themes."""
          addons_list = super()._get_active_addons_list()
          website = self.env['website'].get_current_website(fallback=False)
  
          if not website:
              return addons_list
  
          IrModule = self.env['ir.module.module'].sudo()
          # discard all theme modules except website.theme_id
          themes = IrModule.search(IrModule.get_themes_domain()) - website.theme_id
          to_remove = set(themes.mapped('name'))
  
          return [name for name in addons_list if name not in to_remove]
function_tokens: def _get_active_addons_list ( self ) : addons_list = super ( ) . _get_active_addons_list ( ) website = self . env [ 'website' ] . get_current_website ( fallback = False ) if not website : return addons_list IrModule = self . env [ 'ir.module.module' ] . sudo ( ) # discard all theme modules except website.theme_id themes = IrModule . search ( IrModule . get_themes_domain ( ) ) - website . theme_id to_remove = set ( themes . mapped ( 'name' ) ) return [ name for name in addons_list if name not in to_remove ]