feat: hide Course, Transfer Course, and Save Order buttons in POS UI

This commit is contained in:
Suherdy Yacob 2026-05-25 10:53:05 +07:00
parent b0d52af074
commit 1d7162cf61
4 changed files with 25 additions and 1 deletions

View File

@ -10,7 +10,11 @@ This Odoo 19 module enhances the security and auditability of the Point of Sale
- **Order Attribution**: - **Order Attribution**:
- `Order Taker`: Records the employee who first authenticated for the table. - `Order Taker`: Records the employee who first authenticated for the table.
- `Cashier`: Records the employee who authenticated for the payment. - `Cashier`: Records the employee who authenticated for the payment.
- **UI Streamlining**: Removes manual "+ New Order" buttons to enforce a table-based workflow. - **UI Streamlining**:
- Removes manual "+ New Order" buttons to enforce a table-based workflow.
- Hides the "Course" button on the POS UI.
- Hides the "Transfer Course" button on the POS UI.
- Hides the save order for later (upload icon) button from the POS UI.
## Dependencies ## Dependencies

View File

@ -8,6 +8,9 @@
- Enforce PIN entry on table selection - Enforce PIN entry on table selection
- Enforce PIN entry on payment with role check - Enforce PIN entry on payment with role check
- Record order creator and payer employees - Record order creator and payer employees
- Hide "Course" button on POS UI
- Hide "Transfer Course" button on POS UI
- Hide "Save Order for Later" (upload) button on POS UI
""", """,
'author': 'Suherdy Yacob', 'author': 'Suherdy Yacob',
'depends': ['pos_restaurant', 'pos_hr', 'pos_employee_role'], 'depends': ['pos_restaurant', 'pos_hr', 'pos_employee_role'],

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="pos_custom_access.ControlButtons" t-inherit="point_of_sale.ControlButtons" t-inherit-mode="extension">
<!-- Hide the "Course" button -->
<xpath expr="//button[hasclass('course-btn')]" position="replace">
<!-- Hidden Course button -->
</xpath>
<!-- Hide the "Transfer Course" button -->
<xpath expr="//button[contains(@t-on-click.stop, 'clickTransferCourse') or contains(@t-on-click, 'clickTransferCourse') or contains(., 'Transfer course')]" position="replace">
<!-- Hidden Transfer Course button -->
</xpath>
</t>
</templates>

View File

@ -107,4 +107,8 @@ patch(PosStore.prototype, {
// Default to true if no role system // Default to true if no role system
return true; return true;
}, },
get showSaveOrderButton() {
return false;
},
}); });