(self, website_id)
return self.website_id.id == website_id or (not self.website_id and (self.selectable or self.sudo().code))
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`.
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.
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 .
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))
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 ) )