feat: hide time filter group from KDS sidebar via XML template patch

This commit is contained in:
Suherdy Yacob 2026-05-26 09:16:16 +07:00
parent 613ffa197f
commit 359a11af1f
3 changed files with 20 additions and 0 deletions

View File

@ -29,6 +29,11 @@ Additionally, this module preserves timer continuity for orders and lines on the
- 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

View File

@ -18,6 +18,7 @@
'pos_preparation_display.assets': [
'pos_kds_report/static/src/app/models/pos_preparation_state.js',
'pos_kds_report/static/src/app/services/preparation_display_service.js',
'pos_kds_report/static/src/app/components/preparation_display/preparation_display.xml',
],
},
'installable': True,

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!--
Hide the "Time" filter group (Now / Today / Tomorrow / Next days)
from the KDS sidebar. We use t-inherit to patch only the specific
block so all other sidebar content (Preset, Categories, zoom, logo)
is left untouched.
-->
<t t-inherit="pos_enterprise.PrepDisplay" t-inherit-mode="extension">
<xpath expr="//div[hasclass('o_pdis_time')]" position="replace">
<!-- Time grouping intentionally removed by pos_kds_report -->
</xpath>
</t>
</templates>