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

I'm working on these files to add a custom autoincrement value to each pos ticket generated in odoo v10:

Point_of_sale es el modulo 

.. \addons\point_of_sale\static\src\js\ models.js

.. \addons\pos_ticket\static\src\xml\pos_ticket_view.xml
odoo code:

Model.js
order_id_ : function (){
                var x = 1;        
                if(this.pos.order.id)
                    {
                        x = this.pos.order.id++;
                    }
                else
                    {
                        x = x++;
                    }
            function sequense(num)
                {
                    var s = ""+ num;
                    while (s.length < 8)
                    {
                        s = "0" + s;
                    }
                    return s;
                }
            return sequense(x);
        },
pos_ticket_view.xml
<t t-esc="order.order_id_()" / >



odooSo far I get this error because the variable isn't yet created:

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ต.ค. 25
680
1
ก.ย. 25
1534
Slow product loading times POS 18 ODOO แก้ไขแล้ว
2
ก.ย. 25
1662
1
ส.ค. 25
1389
1
ก.ค. 25
1649