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

I'm currently trying to add a small function in the Point of Sale module.

I've created a JS script, but it doesn't seem to work.

I think the issue is with the file path.


Here’s my current __manifest__.py configuration:

'assets': {

    'point_of_sale._assets_pos': [

        'costum_x_angel/static/custom_pos.js'

    ],

}


Previously, I used: 

'point_of_sale.assets' 

I suspect the problem is in the file path because I don't see any logs, and nothing happens—not even a syntax error. 

Any suggestions on how to fix this? 

Thanks 

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

Hi,

1. If you're using Odoo 16, use 'point_of_sale.assets'.

2. If you're using Odoo 17, use 'point_of_sale._assets_pos'.

3. Ensure the folder structure follows (static/src/js/ for JS files).


Hope it helps

อวตาร
ละทิ้ง
ผู้เขียน

I have already resolved the problem. The issue was with the file path: custom_x_angel/static/src/js/custom_pos.js.
Thanks!

ผู้เขียน คำตอบที่ดีที่สุด


I'm sorry.

I'm using Odoo 17 Enterprise.

I tried to change the route because I don't know what happened. 
Thanks, I'll try it.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ส.ค. 25
773
1
พ.ย. 19
4592
1
ธ.ค. 24
1529
0
ธ.ค. 24
1182
1
พ.ค. 24
2675