[FIX] website_sale: do not display unavailable pricelists
It should not be possible via /shop/change_pricelist/<pl_id> to change to a pricelist that is not marked as selectable. is_pricelist_available method should do that, but is not, because it calls get_pricelist_available with show_visible=True, instead of show_visible=False :param bool show_visible: if True, we don't display pricelist where selectable is False (Eg: Code promo) Closes #17220
This commit is contained in:
committed by
Thibault Delavallée
parent
8ee9cec4d5
commit
97790089c4
@@ -268,7 +268,7 @@ class Website(models.Model):
|
||||
:param int pl_id: The pricelist id to check
|
||||
:returns: Boolean, True if valid / available
|
||||
"""
|
||||
return pl_id in self.get_pricelist_available(show_visible=False).ids
|
||||
return pl_id in self.get_pricelist_available(show_visible=True).ids
|
||||
|
||||
def get_current_pricelist(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user