domingo, 26 de setembro de 2010

How to edit Openerp POS receipt template

This post will explain one possible method for editing Openerp POS receipt template. It is possible to use the same method for all other templates.

At "Server\addons\point_of_sale_extension\report" openerp directory there will be the "pos_receipt.sxw" file. This is a template file that can be easily edited using Writer. Before editing, make a backup copy of the file. After editing, ajusting and saving it as wished, it necessary to load the file into openerp. To do it, first assure that module base_repot_designer is installed. Then go to the administration menu as show bellow and click report designer:

Choose the receipt report (pos.receipt) and click on the option "Upload the modified report"

Locate the file on your hard disc and update on Openerp. After this you can try to print the pos receipt and it will come out already with the changes.

You can find more info here, regarding the openerp report mechanism.

See also: How to edit Openerp Sales Order report/template, report_openoffice: reporting engine for OpenERP 

sábado, 4 de setembro de 2010

Creating a java applet for Roman to Numeral conversion and vice-versa

I was wondering if I could publish on my blog a small java applet for converting Roman to Numeral and vice-versa. I adapted the code I found on this web site and created the applet using Netbeans IDE 6.9.1 and when I built it, Netbeans generated 4 files: a html, a jar, a txt and a jnpl.

When the applet was ready, the first issue I found was where to find a place to host the files. After researching on the internet I found a tip saying that I could use Google Sites and create a new site associated to my Google account, and a page for holding files. After that I uploaded the jar and the jnpl files. Then edited the the html file, changing the url for the jar and the jnpl files and pointing them to the google site uploaded files urls. Then tested the html file on my dektop. After that I copied the content of the html file to my blog and posted it.

This is the final result using the .jnpl file:

You can obtain the same result without using the .jpnl file and using the following tag:
 width=275 height=175

You can download the distribution folder.
You can also download the source files.