From 9e6315924e0c04b718ecea8a402ed4e71443402a Mon Sep 17 00:00:00 2001 From: rhe-odoo Date: Fri, 7 Oct 2022 07:58:11 +0000 Subject: [PATCH] [FIX] point_of_sale: close session from pos config There was a traceback when closing the session from the pos config. Step to reproduce: 1. Open a session 2. Go to the pos config 3. Try to close the session This commit allows the user to close the session from the config. closes odoo/odoo#102581 X-original-commit: a34c9ab209c7859ed500fb44d580cc546e56bd37 Signed-off-by: Trinh Jacky (trj) --- addons/point_of_sale/models/res_config_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/res_config_settings.py b/addons/point_of_sale/models/res_config_settings.py index 04efa987915..09d5325acb8 100644 --- a/addons/point_of_sale/models/res_config_settings.py +++ b/addons/point_of_sale/models/res_config_settings.py @@ -173,7 +173,7 @@ class ResConfigSettings(models.TransientModel): def pos_open_ui(self): if self._context.get('pos_config_id'): - pos_config_id = self._context['pos_config_id'][0] + pos_config_id = self._context['pos_config_id'] pos_config = self.env['pos.config'].browse(pos_config_id) return pos_config.open_ui()