Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
1277 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
okt. 23
1862
2
jan. 23
2381
1
jun. 24
1891
1
jun. 23
8180
1
apr. 23
3617