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

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

الصورة الرمزية
إهمال
أفضل إجابة

Hi shyam,

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

الصورة الرمزية
إهمال
أفضل إجابة

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!!! :)

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
ديسمبر 24
2182
0
أغسطس 24
1780
1
أغسطس 24
2822
0
يوليو 24
1422
0
مايو 23
2308