Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
6 Respostas
13833 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Melhor resposta
  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
Cancelar
Melhor resposta



Client: receipt.client.name' />


put this code in the header or the photer 

Avatar
Cancelar
Melhor resposta

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

Avatar
Cancelar
Autor Melhor resposta

 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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
ago. 25
849
1
jul. 25
1088
3
jul. 25
3711
3
mai. 25
1957
1
jul. 25
1279