Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
6 Risposte
13882 Visualizzazioni

Hello 


I want to ask  how can i make client s name to be printed  on the POS receipt  

I hope that s possible  because i really need it  in my work 

Avatar
Abbandona
Risposta migliore

Hi,

A third party module is available in the Odoo app store having the same functionalities. It will be bring the customer name in the pos ticket . Either you can use the module of check the code and see how it is done,

https://apps.odoo.com/apps/modules/10.0/pos_ticket/



Thanks



Avatar
Abbandona
Risposta migliore
  1. If you use Odoo enterprise or online, simply activate the use of loyalty cards. No customization needed.

  2. If you use Odoo community, loyalty cards feature is not available so you need customization. You can edit the pos.xml file and add following tag "<t t-esc='receipt.partner_id.name'/>" anywhere you want it.

  3. As a soft alternative to point 3, just go to your Odoo point of sales settings, and add following code in the footer or header field:

    <!DOCTYPE QWEB>

    <t t-esc='receipt.partner_id.name'/>
    Odoo will interpret the content of the header/footer field and actually print the value of the variables you put in it. Note that it is visible only on printed receipt and not on the screen.

Avatar
Abbandona
Risposta migliore



Client: receipt.client.name' />


put this code in the header or the photer 

Avatar
Abbandona
Risposta migliore

Hi @patrick, @Moustapha, I had the same error, did you manage to find a solution?

Avatar
Abbandona
Autore Risposta migliore

 Hi     @patrick  

I ve just tried the  3 option  because   it was  the easiest    since im not so good with coding 

but when i did   this  error  accured   


 Uncaught Error: QWeb2 - template['subreceipt']: Runtime Error: TypeError: Cannot read property 'name' of undefined

http://45.76.4.68:8069/web/content/311-f08dbe5/web.assets_common.js:3689 Retraçage : Error: QWeb2 - template['subreceipt']: Runtime Error: TypeError: Cannot read property 'name' of undefined at Object.exception (http://45.76.4.68:8069/web/content/311-f08dbe5/web.assets_common.js:3689:7) at Engine.eval (eval at _render (http://45.76.4.68:8069/web/content/311-f08dbe5/web.assets_common.js:3731:73), <anonymous>:14:29) at Engine._render (http://45.76.4.68:8069/web/content/311-f08dbe5/web.assets_common.js:3730:296) at Engine.render (http://45.76.4.68:8069/web/content/311-f08dbe5/web.assets_common.js:3730:151) at Engine._render (http://45.76.4.68:8069/web/content/311-f08dbe5/web.assets_common.js:3734:57) at Engine.render (http://45.76.4.68:8069/web/content/311-f08dbe5/web.assets_common.js:3730:151) at render_xml (http://45.76.4.68:8069/web/content/572-8f50de9/point_of_sale.assets.js:196:328) at child.export_for_printing (http://45.76.4.68:8069/web/content/572-8f50de9/point_of_sale.assets.js:198:81) at Class.get_receipt_render_env [as _super] (http://45.76.4.68:8069/web/content/572-8f50de9/point_of_sale.assets.js:379:1110) at Class.get_receipt_render_env (http://45.76.4.68:8069/web/content/572-8f50de9/point_of_sale.assets.js:420:305)
Avatar
Abbandona
Risposta migliore

there is a template for that. find it and change it however you need.if not possible by default, add some code.

view: report_receipt

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
ago 25
868
1
lug 25
1104
3
lug 25
3774
3
mag 25
1991
1
lug 25
1287