Skip to Content
Menú
This question has been flagged
1 Respondre
1163 Vistes

Hello friends, I came to this forum to request some help about odoo v16.0, specifically in the point of sale module; I need to include in the ticket the name of the client and the reference of each product sold, I appreciate any information or path that you can help me take to achieve it, thank you very much

Avatar
Descartar
Best Answer

Hi,

To include the client's name and the reference of each product sold on the receipt in the Odoo v16 Point of Sale (POS) module, you need to customize the receipt template by inheriting the OrderReceipt template. Below is an example of how you can achieve this:

<templates id="template" xml:space="preserve">
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
<xpath expr="//t[@t-esc='receipt.cashier']/.." position="after">
            <t t-if="receipt.partner">
                <div>
Customer: <t t-esc="receipt.partner.name"/>
                </div>
            </t>
        </xpath>
    </t>
  </templates>


To include the product reference we need to inherit the OrderLineReceipt template.


  <t t-name="OrderLinesReceipt" t-inherit="point_of_sale.OrderLinesReceipt" t-inherit-mode="extension" owl="1"> <xpath expr="//t[@t-foreach='receipt.orderlines']" position="inside"> <t t-foreach="orderlines" t-as="orderline" t-key="orderline.id">

<div>

<t t-if="orderline.product.default_code">

<t t-esc="orderline.product.default_code"/>

                </t>

            </div>

       </t> </xpath> </t></t>


For more information about customizing pos Customer Receipts you can check this blogs:

Customize PoS Receipts in the Odoo 16

Customize Customer Receipts


Hope it helps

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
d’oct. 23
2799
1
de maig 24
1547
2
de jul. 23
9435
0
de juny 23
1409
0
de des. 22
2740