Skip to main content

Posts

Showing posts from August, 2015

Enable or Disable OpenbravoERP html buttons

Disable: The button: $('#SubmitButton').prop('disabled', true); The css of the button: document.getElementById('SubmitButton').setAttribute("class", "ButtonLink_disabled"); Enable: The button: $('#SubmitButton').prop('disabled', false); The css of the button: document.getElementById('SubmitButton').setAttribute("class", "ButtonLink_enabled");

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/rece