You've got three rules that could affect the price of the product:
1) by product itself
2) by category
3) globally
So, you need to analyze these 3 situations to get the list of products that could be affected by the rules.
This is just and idea on how you could do some kind of search or creation of a new model containing the data. At the end of this, the idea is that you can construct a domain to search for the products.
if the rule is global, affects all products (thats why the domain is ([])
if there are rules for products and categories, you need an 'or' condition. Thats why you add '|' to the domain.
pricelist = self.env['product.pricelist'].browse(your_list_id)
product_obj = self.env['product.product']
product_domain = []
if pricelist.item_ids.filtered(lambda r: r.applied_on == '1_product'):
product_domain.append(('product_id', 'in', pricelist.item_ids.filtered(lambda r: r.applied_on == '1_product').ids))
if pricelist.item_ids.filtered(lambda r: r.applied_on == '2_product_category'):
product_domain.append(('categ_id', 'in', pricelist.item_ids.filtered(lambda r: r.applied_on == '2_product_category').mapped('categ_ids').ids
if pricelist.item_ids.filtered(lambda r: r.applied_on == '3_global':
product_domain = []
if len(product_domain) == 2:
product_domain = ['|'] + product_domain
product_ids = product_obj.search(product_domain)