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

Hi, I'm trying to add an external script to the pos for payment integration. Is there a way to add the script?
I've been trying to add like this

xml version="1.0" encoding="utf-8"?>
<odoo>    
​<templateid="assets"inherit_id="point_of_sale.assets">
        <xpathexpr="."position="inside">
            <scripttype="text/javascript"src="https://app-sandbox.duitku.com/lib/js/duitku.js">script>
xpath>   
template>
odoo>
But no luck for this.
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Adding an external script to Odoo POS v.15 has gotten a bit simpler. No more fussing with separate asset files. Now, you can just dive into the manifest file and do the deed.

Here's a snippet of what you'll want to pop into your __manifest__.py file:

'assets': {
    'point_of_sale.assets': [
        'https://app-sandbox.duitku.com/lib/js/duitku.js',
    ],
},

With this snippet, you're basically telling Odoo, "Hey, grab this external JavaScript file (`duitku.js`) and add it to our project's assets." Just make sure that URL is spot-on and accessible.

Hope this helps

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 25
618
1
ก.ค. 25
851
3
ก.ค. 25
2956
Import/Export Excel files แก้ไขแล้ว
3
พ.ค. 25
1590
1
ก.ค. 25
1075