Skip to Content
Menu
This question has been flagged
1 Reply
7668 Views

Hi,
I have used the following code to raise an error popup in Odoo13 POS.

this.gui.show_popup('error',{
                'title': _t('Error Alert'),
                'body': _t("Error Message"),                        
                });

But it causing me an error like this.

Uncaught TypeError: Cannot read property 'show_popup' of undefined
http://user:8015/web/content/997-919d80d/point_of_sale.assets.js:553
Traceback:
TypeError: Cannot read property 'show_popup' of undefined
    at child.set_quantity (http://user:8015/web/content/997-919d80d/point_of_sale.assets.js:553:39)
    at Class.set_value (http://user:8015/web/content/997-919d80d/point_of_sale.assets.js:548:32)
    at Class.set_value (http://user:8015/web/content/695-aa0ea09/web.assets_common.js:3863:371)
    at triggerEvents (http://user:8015/web/content/997-919d80d/point_of_sale.assets.js:12:242)
    at child.trigger (http://user:8015/web/content/997-919d80d/point_of_sale.assets.js:7:223)
    at child.appendNewChar (http://user:8015/web/content/997-919d80d/point_of_sale.assets.js:275:6)
    at Class.clickAppendNewChar (http://user:8015/web/content/997-919d80d/point_of_sale.assets.js:390:1804)
    at HTMLButtonElement.dispatch (http://user:8015/web/content/695-aa0ea09/web.assets_common.js:1024:447)
    at HTMLButtonElement.elemData.handle (http://user:8015/web/content/695-aa0ea09/web.assets_common.js:1010:166)

Thanks in advance.

Avatar
Discard
Best Answer

Hi,

Can you try after changing the line

this.gui.show_popup('error',{
                'title': _t('Error Alert'),
                'body': _t("Error Message"),                        
                });

as follows

this.pos.gui.show_popup('error',{
                'title': _t('Error Alert'),
                'body': _t("Error Message"),                        
                });


Regards

Avatar
Discard
Related Posts Replies Views Activity
0
Sep 24
205
1
Aug 24
8082
0
Sep 23
352
0
Mar 23
5761
2
Aug 22
6826