[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) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
This commit is contained in:
roen-odoo
2023-10-10 15:42:56 +00:00
parent e08b9f5f15
commit 7500db787c
@@ -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')