تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
1608 أدوات العرض

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أغسطس 25
517
1
نوفمبر 19
4473
1
ديسمبر 24
1431
0
ديسمبر 24
1096
1
مايو 24
2544