parameters: (self, website_id)
return_statement: return self.website_id.id == website_id or (not self.website_id and (self.selectable or self.sudo().code))
docstring: To be able to be used on a website, a pricelist should either:
          - Have its `website_id` set to current website (specific pricelist).
          - Have no `website_id` set and should be `selectable` (generic pricelist)
            or should have a `code` (generic promotion).
          - Have no `company_id` or a `company_id` matching its website one.
  
          Note: A pricelist without a website_id, not selectable and without a
                code is a backend pricelist.
  
          Change in this method should be reflected in `_get_website_pricelists_domain`.
docstring_summary: To be able to be used on a website, a pricelist should either:
          - Have its `website_id` set to current website (specific pricelist).
          - Have no `website_id` set and should be `selectable` (generic pricelist)
            or should have a `code` (generic promotion).
          - Have no `company_id` or a `company_id` matching its website one.
docstring_tokens: To be able to be used on a website a pricelist should either : - Have its website_id set to current website ( specific pricelist ) . - Have no website_id set and should be selectable ( generic pricelist ) or should have a code ( generic promotion ) . - Have no company_id or a company_id matching its website one .
function: def _is_available_on_website(self, website_id):
          """ To be able to be used on a website, a pricelist should either:
          - Have its `website_id` set to current website (specific pricelist).
          - Have no `website_id` set and should be `selectable` (generic pricelist)
            or should have a `code` (generic promotion).
          - Have no `company_id` or a `company_id` matching its website one.
  
          Note: A pricelist without a website_id, not selectable and without a
                code is a backend pricelist.
  
          Change in this method should be reflected in `_get_website_pricelists_domain`.
          """
          self.ensure_one()
          if self.company_id and self.company_id != self.env["website"].browse(website_id).company_id:
              return False
          return self.website_id.id == website_id or (not self.website_id and (self.selectable or self.sudo().code))
function_tokens: def _is_available_on_website ( self , website_id ) : self . ensure_one ( ) if self . company_id and self . company_id != self . env [ "website" ] . browse ( website_id ) . company_id : return False return self . website_id . id == website_id or ( not self . website_id and ( self . selectable or self . sudo ( ) . code ) )