From 988421a0c50caa9f8ba1205683f53e9b756ef7c6 Mon Sep 17 00:00:00 2001 From: "matthias.lotz" Date: Fri, 9 Jan 2026 15:24:26 +0100 Subject: [PATCH] POS: Replace internal note button with pricelist button - Remove internal note button from control buttons - Add pricelist button directly visible in main view (not only in Actions dialog) - Shows current pricelist name of the order/partner - Allows direct access to change pricelist without opening Actions menu --- open_workshop_pos/__manifest__.py | 2 ++ .../src/js/ows_control_buttons_patch.js | 20 ++++++++++++++++ .../src/xml/ows_control_buttons_patch.xml | 24 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 open_workshop_pos/static/src/js/ows_control_buttons_patch.js create mode 100644 open_workshop_pos/static/src/xml/ows_control_buttons_patch.xml diff --git a/open_workshop_pos/__manifest__.py b/open_workshop_pos/__manifest__.py index 8809bf6..c37a52f 100644 --- a/open_workshop_pos/__manifest__.py +++ b/open_workshop_pos/__manifest__.py @@ -41,6 +41,7 @@ Autor: HobbyHimmel 'open_workshop_pos/static/src/js/ows_product_screen_default_category.js', 'open_workshop_pos/static/src/js/ows_order_patch.js', 'open_workshop_pos/static/src/js/ows_receipt_header_patch.js', + 'open_workshop_pos/static/src/js/ows_control_buttons_patch.js', # XML Templates 'open_workshop_pos/static/src/xml/ows_pos_sidebar.xml', @@ -50,6 +51,7 @@ Autor: HobbyHimmel 'open_workshop_pos/static/src/xml/ows_product_card_patch.xml', 'open_workshop_pos/static/src/xml/ows_receipt_header_patch.xml', 'open_workshop_pos/static/src/xml/ows_voucher_codes_patch.xml', + 'open_workshop_pos/static/src/xml/ows_control_buttons_patch.xml', # CSS 'open_workshop_pos/static/src/css/pos.css', diff --git a/open_workshop_pos/static/src/js/ows_control_buttons_patch.js b/open_workshop_pos/static/src/js/ows_control_buttons_patch.js new file mode 100644 index 0000000..a8794fc --- /dev/null +++ b/open_workshop_pos/static/src/js/ows_control_buttons_patch.js @@ -0,0 +1,20 @@ +/** @odoo-module **/ + +import { ControlButtons } from "@point_of_sale/app/screens/product_screen/control_buttons/control_buttons"; +import { patch } from "@web/core/utils/patch"; + +patch(ControlButtons.prototype, { + /** + * Override to hide internal note button + */ + get showInternalNote() { + return false; + }, + + /** + * Override to show pricelist button always (not just in modal) + */ + get showPricelistButton() { + return !this.props.showRemainingButtons && !this.ui.isSmall; + }, +}); diff --git a/open_workshop_pos/static/src/xml/ows_control_buttons_patch.xml b/open_workshop_pos/static/src/xml/ows_control_buttons_patch.xml new file mode 100644 index 0000000..d6a7ed2 --- /dev/null +++ b/open_workshop_pos/static/src/xml/ows_control_buttons_patch.xml @@ -0,0 +1,24 @@ + + + + + + + + false + + + + + + + + + +