Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1255 Vistas

Hi Everyone,

I'm working on customizing the POS Payment Receipt in Odoo and I need to add the Company ID in the header section of the receipt. I've already enabled Developer Mode, and I understand that I need to modify the QWeb template for the POS receipt, but I’m unsure about the exact steps.

Here’s what I’m trying to achieve:

  • Display the Company ID at the top of the printed POS receipt, along with the company name, address, and phone number.

Does anyone have a step-by-step guide or code example for adding the Company ID in the POS payment receipt header? and which report/view should be edited?

I believe it involves modifying the point_of_sale.pos_ticket template, but I’m not sure where or how to reference the Company ID field in the template. Any help would be greatly appreciated!

Thanks in advance!

Odoo Version: 

Odoo 18.0+e (Enterprise Edition)

POS Module


Avatar
Descartar
Mejor respuesta

Hi,

Inherit Receipt Header template and add the company ID to the corresponding position.<?xml version="1.0" encoding="UTF-8" ?>

<templates id="template" xml:space="preserve">

   <t t-name="ReceiptHeader" t-inherit="point_of_sale.ReceiptHeader" t-inherit-mode="extension">

           <xpath expr="//div[@t-if='props.data.cashier']" position="inside">

                            <div t-if="props.data.company" t-esc="props.data.company.id" />

            </xpath>

    </t>

    </templates>


Hope it helps

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
oct 23
1852
2
ene 23
2377
1
jun 24
1880
1
jun 23
8172
1
abr 23
3606