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

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

Avatar
Abbandona
Risposta migliore

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


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
dic 24
1397
0
ago 24
1163
1
ago 24
1892
0
lug 24
816
0
mag 23
1619