summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/static/src/js/Popups/ErrorBarcodePopup.js
blob: 8cf11c402078214b3400710eee47d7c436a44ae5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
odoo.define('point_of_sale.ErrorBarcodePopup', function(require) {
    'use strict';

    const ErrorPopup = require('point_of_sale.ErrorPopup');
    const Registries = require('point_of_sale.Registries');

    // formerly ErrorBarcodePopupWidget
    class ErrorBarcodePopup extends ErrorPopup {
        get translatedMessage() {
            return this.env._t(this.props.message);
        }
    }
    ErrorBarcodePopup.template = 'ErrorBarcodePopup';
    ErrorBarcodePopup.defaultProps = {
        confirmText: 'Ok',
        cancelText: 'Cancel',
        title: 'Error',
        body: '',
        message:
            'The Point of Sale could not find any product, client, employee or action associated with the scanned barcode.',
    };

    Registries.Component.add(ErrorBarcodePopup);

    return ErrorBarcodePopup;
});