From 2b45f8be3d26498677a33a7fe7a4327b45996911 Mon Sep 17 00:00:00 2001 From: Hector Vior Date: Wed, 24 Sep 2025 14:40:21 +0200 Subject: [PATCH] [DROP] mcfix_point_of_sale: Don't force session on pos order creation --- mcfix_point_of_sale/models/pos_order.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mcfix_point_of_sale/models/pos_order.py b/mcfix_point_of_sale/models/pos_order.py index cebf018a..53852fc2 100644 --- a/mcfix_point_of_sale/models/pos_order.py +++ b/mcfix_point_of_sale/models/pos_order.py @@ -34,14 +34,14 @@ def create(self, vals): session = self.env['pos.session'].browse(session_id) vals['company_id'] = session.config_id.company_id.id - # If we are creating the pos.order with a specific company but - # not a session, we propose a default session that is consistent with - # the company provided. - if company_id and not session_id: - session = self.with_context( - company_id=company_id)._default_session() - if session: - vals['session_id'] = session.id + # # If we are creating the pos.order with a specific company but + # # not a session, we propose a default session that is consistent with + # # the company provided. + # if company_id and not session_id: + # session = self.with_context( + # company_id=company_id)._default_session() + # if session: + # vals['session_id'] = session.id return super(PosOrder, self).create(vals) @api.onchange('company_id')