diff options
| author | Uku Lagle <ukulagle@gmail.com> | 2017-05-25 22:17:06 +0300 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2017-05-29 12:25:54 +0200 |
| commit | 97790089c4e52c763b0edb7e4931b8d4f189191c (patch) | |
| tree | 7a5ab0650253b08ab198d6663cd502c5ba834453 | |
| parent | 8ee9cec4d5da60f15dff0cbf354b637e4c6d337b (diff) | |
[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
| -rw-r--r-- | addons/website_sale/models/sale_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_sale/models/sale_order.py b/addons/website_sale/models/sale_order.py index 94edada65ac..28c157dfbfa 100644 --- a/addons/website_sale/models/sale_order.py +++ b/addons/website_sale/models/sale_order.py @@ -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): """ |
