parameters: (self)
return_statement: return wish.filtered(lambda x: x.sudo().product_id.product_tmpl_id.website_published and x.sudo().product_id.product_tmpl_id.sale_ok)
docstring: Get all wishlist items that belong to current user or session,
          filter products that are unpublished.
docstring_summary: Get all wishlist items that belong to current user or session,
          filter products that are unpublished.
docstring_tokens: Get all wishlist items that belong to current user or session filter products that are unpublished .
function: def current(self):
          """Get all wishlist items that belong to current user or session,
          filter products that are unpublished."""
          if not request:
              return self
  
          if request.website.is_public_user():
              wish = self.sudo().search([('id', 'in', request.session.get('wishlist_ids', []))])
          else:
              wish = self.search([("partner_id", "=", self.env.user.partner_id.id), ('website_id', '=', request.website.id)])
  
          return wish.filtered(lambda x: x.sudo().product_id.product_tmpl_id.website_published and x.sudo().product_id.product_tmpl_id.sale_ok)
function_tokens: def current ( self ) : if not request : return self if request . website . is_public_user ( ) : wish = self . sudo ( ) . search ( [ ( 'id' , 'in' , request . session . get ( 'wishlist_ids' , [ ] ) ) ] ) else : wish = self . search ( [ ( "partner_id" , "=" , self . env . user . partner_id . id ) , ( 'website_id' , '=' , request . website . id ) ] ) return wish . filtered ( lambda x : x . sudo ( ) . product_id . product_tmpl_id . website_published and x . sudo ( ) . product_id . product_tmpl_id . sale_ok )