Community mailing list archives

Re: POS payment screen amount input field

Mario Arias Badila
- 08/23/2016 12:25:43
Hi Mohamed,

If you are using Odoo 9, it already has some sort of checking on screens.js...

        // if the change is too large, it's probably an input error, make the user confirm.
        if (!force_validation && (order.get_total_with_tax() * 1000 < order.get_total_paid())) {
                title: _t('Please Confirm Large Amount'),
                body:  _t('Are you sure that the customer wants to  pay') +
                       ' ' +
                       this.format_currency(order.get_total_paid()) +
                       ' ' +
                       _t('for an order of') +
                       ' ' +
                       this.format_currency(order.get_total_with_tax()) +
                       ' ' +
                       _t('? Clicking "Confirm" will validate the payment.'),
                confirm: function() {

You just need to customize it...

On Sun, Aug 21, 2016 at 1:57 PM, Mohamed M. Hagag <> wrote:

Hi all,

I've a problem with one of my customers which is while in the payment screen of POS some times the barcode reader inputs a barcode in the payment field ( his customers puts the product in front of the reader) and this causes an issue.

So I would like to set the max length of the payment input field of the POS screen for ex. to 5 at most.

is there a module to do so already ? or disable barcode event in the pyament screen ?

if no, which function in POS JS files should I modify and can I use JS maxLength() function to do so ?


Post to: