[FIX] website_sale: _get_pl_partner_order
With 60300fc, people can use promo code on website.
But the condition leads to a side effect, if a partner has a pricelist set for
him, he will never be able to see the dropdown list of pricelist since he will
enter the else condition with show_visible set to true.
Now, user is able to see selectable pricelists.
opw-1869371
This commit is contained in:
committed by
Goffin Simon
parent
ce2fdc02ab
commit
e11908d429
@@ -239,8 +239,8 @@ class Website(models.Model):
|
||||
|
||||
if not pricelists: # no pricelist for this country, or no GeoIP
|
||||
pricelists |= all_pl.filtered(lambda pl: not show_visible or pl.selectable or pl.id in (current_pl, order_pl))
|
||||
else:
|
||||
pricelists |= all_pl.filtered(lambda pl: not show_visible and pl.sudo().code)
|
||||
if not show_visible and not country_code:
|
||||
pricelists |= all_pl.filtered(lambda pl: pl.sudo().code)
|
||||
|
||||
# This method is cached, must not return records! See also #8795
|
||||
return pricelists.ids
|
||||
|
||||
Reference in New Issue
Block a user