Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8629 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ย. 24
1406
1
ส.ค. 24
9541
0
ก.ย. 23
1325
0
มี.ค. 23
7407
2
ส.ค. 22
8476