Skip to main content

Openbravo is not printing my custom receipt


This depends on the configuration of the instance and the OB version, please check the wiki: http://wiki.openbravo.com/wiki/Retail:Developers_Guide/How-to/How_to_create_and_modify_new_receipt_documents_from_other_module#Make_the_Template_Available_from_POS_Print_Templates_and_Organization_windows

A dirty and useful trick, is to set the address of the receipt ourselves. After running tomcat, in the generate Javascript file search this line:
this.templatereceipt = new OB.DS.HWResource(terminal.printTicketTemplate || OB.OBPOSPointOfSale.Print.ReceiptTemplate);

Add a breakpoint to the next line:
 extendHWResource(this.templatereceipt, "printTicketTemplate");

And press F5 to the browser POS Terminal, when it gets to the breakpoint that we added, write the address to your custom receipt in the console (in my case /biz.cleardrop.hpsi.securesubmit/receipts/printCard.xml):
this.templatereceipt = new OB.DS.HWResource("../biz.cleardrop.hpsi.securesubmit/receipts/printCard.xml");


Comments

Popular posts from this blog

Configurar pantalla de inicio de sesión Ubuntu

Configurar pantalla de inicio de sesión Si quieres personalizar el inicio de sesión (pantalla de logeo), puedes instalar un programa llamado Ubuntu Tweak muy intuitivo y que te permite modificar el fondo de la pantalla de logeo entre otras cosas, primero vamos a instalar Ubuntu Tweak: sudo add-apt-repository ppa:tualatrix/ppa  sudo apt-get update  sudo apt-get install ubuntu-tweak  Una vez instalado, al entrar en System Settings deberia aparecerte el icono de Ubuntu Tweak: Luego de darle click a Ubuntu Tweak, dale click a la pestaña de "Tweaks" y a Login Settings: Para modificar la pantalla de Login se requiere permisos de superuser, dale a la opcion de "Unlock" para que puedas realizar cambios: Le das click a la imagen para cambiar el background y al Gtk theme, por ejemplo; mi resultado fue: Espero haber sido de ayuda. Fue hecho en: Ubuntu 12.04

Solving Groovy compiler in GGTS (Groovy: compiler mismatch)

Hello world, So I was trying to run a Grails 2.3.5 project in my recently installed GGTS 3.4, and I was getting the next error: Description    Resource    Path    Location    Type Groovy: compiler mismatch Project level is: 2.1 Workspace level is 2.0 Groovy compiler level expected by the project does not match workspace compiler level. I couldn't find the Groovy Compiler 2.1 and didn't know how to install it. Here is how you do it: " ...To install the Groovy 2.1 compiler in GGTS, first click on the Dashboard tab. If it is not visible, goto Help -> Dashboard. at the bottom left of the window, click Extensions. Scroll down the list and check Groovy 2.1 Compiler for Groovy-Eclipse. Then click Install on the lower right of the window. Follow the defaults to install, and it will configure itself. I have found it cumbersome to get existing projects to fully correct themselves, so I usually just delete the project an...

Backup gmail and google account data in 5 minutes

Hello World! For some reason we want to do a backup. A paranoid backup (in my case). We can backup all the google account data following these steps: 1. Log into your google account and go to: https://www.google.com/settings/takeout?pli=1 2. Select what you want to backup:  3. Continue and choose how do you want your backup to be delivery (I chose by email, but you can also store it on Google Drive) 4. Wait until you get a mail with the link (For my 500 MB mail backup it took 10 minutes, it could take more time to receive the mail, depending on your data) 5. Done! you can now download the data!