hi !

firstly with add this function between print_file and findPDFOpener function in 
printer.py (client part)
def _findJRXMLOpener(self):
      if os.name == 'nt':
         return lambda fn: os.system('cd 
' + options.options['printer.ireport_path'] + ' && iReport.exe ' + 
fn)
      else:
         def opener(fn):
            os.spawnv(os.P_NOWAIT, 
options.options['printer.ireport_path']+'/iReport.sh', 
(options.options['printer.ireport_path']+'/iReport.sh', fn))
         return opener

secondly, in options.py (client part), add this 2 lines in class configmanager 
/ def init method :




'printer.ireport_path': '/home/opencplusnet/local/src/iReport-3.0.0',
        
 'printer.ireport_dst':'/home/opencplusnet/opencplusnet_ireport',


then, serer side, in a xml view where you define the report, you can call the 
ireport templat elike this :

<report
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;id="id_account_invoices_ireport"
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;string="beautiflul nvoices"
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;model="account.invoice"
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;name="my.account.invoices"
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;xml="my_account/report/factures.jrxml"
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;auto="False" 
&nbsp; &nbsp;&nbsp; &nbsp;/>

i hope, i didn't forget some code, else ring me !

good luck

------------------------
J. Tason
IT manag Wh. Paris




-------------------- m2f --------------------

--
http://www.openerp.com/forum/viewtopic.php?p=27540#27540

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to