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

Hello friends,

do you have an idea how to show eWallet ballance and my company address on POS receipt? I am not able to find it. I use Advanced POS Receipt by Cybrosys Techno Solutions on Odoo 18 on my own server.


Thank you

아바타
취소
베스트 답변

Steps to fix this issue :- 


  1.   Inject Wallet Balance and Company Address in PosOrder.js

​( Add this to the export_for_printing() method:)

if (this.partner_id){

    result.headerData.wallet_balance = this.partner_id.wallet_balance || 0.0;

}

if (this.pos.company){

    const company = this.pos.company;

    result.headerData.company_address = `${company.name || ''}, ${company.street || ''}, ${company.city || ''}, ${company.country_id?.name || ''}`;

}

( You might also need to ensure wallet_balance is loaded using:) 

​import { loadFields } from "@point_of_sale/app/utils/loader";

loadFields("res.partner", ["wallet_balance"]);


​2. ​Modify the Receipt Template (OrderReceipt.xml)

​( Add this inside the <xpath> block already extending the receipt)


​<div style="font-weight:bold;">

​    Company Address: <t t-esc="this.props.data.company_address"/>

​</div>

​<div style="font-weight:bold;">

​    eWallet Balance: <t t-esc="this.props.data.wallet_balance"/>

​</div>


​3. Restart & Upgrade.




Thanks & Regards ,


Company :- DataInteger Consultancy Services LLP


아바타
취소
관련 게시물 답글 화면 활동
1
12월 24
1355
0
8월 24
1133
1
8월 24
1865
0
7월 24
794
0
5월 23
1609