Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
1362 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
ott 23
1928
2
gen 23
2456
1
giu 24
1950
1
giu 23
8253
1
apr 23
3667