From 78f77a89a44a7368c8fb61f3b7373fb83e8fba02 Mon Sep 17 00:00:00 2001 From: vlst Date: Thu, 7 Sep 2023 11:55:43 +0200 Subject: [PATCH] [FIX] point_of_sale: fix `restrict categories` bug The products are not correctly loaded in the POS because of a bug regarding the `Restrict Categories` feature. Steps to reproduce: 1. Create a `pos config` with `Restrict Categories` set to: `categ1` and `categ2` 2. Disable `Restrict Categories` 3. Open the POS and notice that although all the categories are present in the category selector, only the products from `categ1` and `categ2` are loaded. closes odoo/odoo#134645 Task: 3497308 Signed-off-by: Joseph Caburnay (jcb) --- addons/point_of_sale/models/pos_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_config.py b/addons/point_of_sale/models/pos_config.py index ee24a8305d9..b8952136ea0 100644 --- a/addons/point_of_sale/models/pos_config.py +++ b/addons/point_of_sale/models/pos_config.py @@ -663,7 +663,7 @@ class PosConfig(models.Model): ('available_in_pos', '=', True), ('sale_ok', '=', True), ] - if self.iface_available_categ_ids: + if self.limit_categories and self.iface_available_categ_ids: domain.append(('pos_categ_ids', 'in', self.iface_available_categ_ids.ids)) if self.iface_tipproduct: domain = OR([domain, [('id', '=', self.tip_product_id.id)]])