Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4491 Lượt xem

Hi,

How we can add another field of product on POS receipt print out? Actually need to add a field on product with translated value of product name and need to show that under product name on receipt report.

thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi shyam,

Sorry i am new to odoo might need more details like js load etc. Thanls

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

For this you need to inherit the PosTicket template and place your code inside the order line. Here is the example how you can do it.

Suppose the field name is  'new_field_name', then 

<t t-extend="PosTicket" >

    <t t-jquery=".receipt-orderlines tr td:nth-child(1)" t-operation="append"> 

       <t t-esc="orderline.get_product().new_field_name"/> 

    </t>

</t>

Make sure you load the new filed in your js file. Hope this helps you!!! :)

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 24
2169
0
thg 8 24
1765
1
thg 8 24
2796
0
thg 7 24
1404
0
thg 5 23
2294