콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1490 화면

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


아바타
취소
베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
1
10월 23
1996
2
1월 23
2568
1
6월 24
2055
1
6월 23
8323
1
4월 23
3752