Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
187 Weergaven

Hello everyone,

In my Odoo 19 Point of Sale, every time I open the POS or complete an order, the system automatically focuses on the product search bar.

Because of this, I have to click or press Enter on the search field every time before I can select a product — which is not convenient for my cashiers.

I checked all POS configuration options (Interface, Products, Payments, etc.), but there is no setting to disable the auto-focus behavior on the search bar.

Is there any built-in option or a small customization (JS patch or Studio method) to stop the POS from focusing on the search input automatically, so that users can directly click on products and sell faster?

Thank you in advance for your help!

Best regards,

Avatar
Annuleer
Beste antwoord

To address the issue where the search field does not clear automatically after scanning a barcode or entering an internal reference code, you can implement a small JavaScript customization to clear the search field after a product is added.

odoo.define('custom_pos.clear_search_after_scan', function (require) {

    "use strict";


    var BarcodeEvents = require('point_of_sale.BarcodeEvents');

    var PosModel = require('point_of_sale.PosModel');


    BarcodeEvents.include({

        _barcode_scanned: function(barcode) {

            this._super(barcode);

            // Clear the search field after scanning

            $('.search').val('');

        },

    });

});

This JavaScript code listens for a barcode scan event and, once a product is added, clears the search field automatically. You can add this script either through a custom module or by using Odoo Studio’s JS editor

Avatar
Annuleer
Beste antwoord

Hi,

Unfortunately, there is no built-in configuration setting to disable the automatic focus on the search bar in Odoo 19 POS. This behavior is hardcoded into the POS interface to facilitate keyboard-based product searches.


Hope it helps

Avatar
Annuleer
Auteur

when my cashier adds a product by barcode or internal reference code, the search field doesn’t clear automatically after the product is added. Each time, they have to manually delete the previous code before scanning the next barcode.

Is there any solution or small JS customization to make the search bar clear automatically after adding a product?