pos_kds_report/README.md

3.2 KiB

POS KDS Tracker and Report

Overview

Standard Odoo 19 deletes POS Preparation Display (KDS) records a day after completion, preventing historical analysis of preparation times. This module creates a persistent log of completed orders and order lines from the Kitchen Display System (KDS) to enable detailed, multi-dimensional historical reporting.

Additionally, this module preserves timer continuity for orders and lines on the Kitchen Preparation Display UI when they are recalled or resetted back to preparation stages, and fully optimizes reporting metrics for 2-stage KDS configurations.


Features

1. Timer Continuity on Reset/Recall (UI & Backend)

  • When an order or order line is recalled or resetted back from Completed to a preparation stage, the KDS UI timer continues counting upwards from its last accumulated elapsed time instead of resetting back to 0.
  • The backend automatically stores, updates, and broadcasts the accumulated KDS elapsed time (kds_accumulated_time) via the Odoo Bus to keep the display perfectly in sync.

2. 2-Stage KDS Optimization

  • For simplified 2-stage KDS setups (To Prepare \rightarrow Completed), the module automatically ensures:
    \text{Preparation Time} = \text{Service Time} = \text{Completion Time}
  • This prevents the total elapsed time from being doubled in reports when no intermediate serving/ready stage exists.

3. Comprehensive Dual Measures (Sum & Avg)

  • Generates pivot and graph reports showing both Sum and Average metrics natively for every duration:
    • Completion Time (s) (Sum) & Average Completion Time (s) (Avg)
    • Preparation Time (s) (Sum) & Average Preparation Time (s) (Avg)
    • Service Time (s) (Sum) & Average Service Time (s) (Avg)
  • Average Completion Time is loaded by default as the main measure in pivot and graph views, but all other options can be fully toggled or combined under the Measures dropdown list.

4. Automatic Historical Backfill Migration

  • Upgrading the module automatically executes a post-install data migration.
  • It copies historical sums into the new average-specific database columns, preventing the average columns from appearing blank for pre-existing records.

5. Hide Time Grouping in KDS Sidebar

  • The Time filter group (Now / Today / Tomorrow / Next days) is removed from the KDS sidebar.
  • All other sidebar sections (Preset, Product Categories, zoom controls, Clear All Orders) remain fully functional.
  • Implemented via an OWL template XPath patch (t-inherit) so no core Odoo files are modified.

Installation

Install out-of-the-box like a standard Odoo module on an Odoo 19 environment possessing POS Enterprise (pos_enterprise).


Usage

  1. Open the Point of Sale and place orders to the KDS.
  2. Complete stages in the Preparation Display.
  3. If an order or line needs to be recalled or resetted back to preparation, the display UI timer will resume incrementing starting from the previous session's elapsed time.
  4. Go to Point of Sale > Reporting > KDS Product Analysis or KDS Order Analysis to view Pivot and Graph summaries.
  5. In the pivot table view, toggle Measures to add, remove, or compare Sum and Average durations dynamically.