From 7500db787cd74ceedb15702d09b7280c05c64993 Mon Sep 17 00:00:00 2001 From: roen-odoo Date: Tue, 3 Oct 2023 14:27:28 +0000 Subject: [PATCH] [FIX] point_of_sale: docids doesn't represent a session_id Current behavior: When you link a printer to the sales detail report. The report will contains no order. This happens because we are trying to assign docids to the session_id. Steps to reproduce: - Install pos_iot - Link a printer from the demo iot to the sales_detail report (go in settings > reporting > reports) - Do some orders on the PoS, and close it - Go in the backend, and print the sales detail report - You will see that the report is empty (You can put a breakpoint in `get_sale_details` method to see that it will be empty) opw-3247196 closes odoo/odoo#138241 X-original-commit: 489985661d689dde1a1385db2fc4a0a51fb5a7db Signed-off-by: Vlad Stroia (vlst) Signed-off-by: Robin Engels (roen) --- addons/point_of_sale/models/report_sale_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/report_sale_details.py b/addons/point_of_sale/models/report_sale_details.py index a0e0cec063f..21aafcc6cd8 100644 --- a/addons/point_of_sale/models/report_sale_details.py +++ b/addons/point_of_sale/models/report_sale_details.py @@ -325,7 +325,7 @@ class ReportSaleDetails(models.AbstractModel): data = dict(data or {}) # initialize data keys with their value if provided, else None data.update({ - 'session_ids': data.get('session_ids') or docids, + 'session_ids': data.get('session_ids'), 'config_ids': data.get('config_ids'), 'date_start': data.get('date_start'), 'date_stop': data.get('date_stop')