nagyv

OpenERP report test

Feb 28th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. -
  2.   In order to test the PDF reports defined on an invoice, we will print an Invoice Report
  3. -
  4.   !python {model: account.invoice}: |
  5.     import netsvc, tools, os
  6.     (data, format) = netsvc.LocalService('report.account.invoice.counter3').create(cr, uid, [ref('account.account_invoice_customer0')], {}, {})
  7.     if tools.config['test_report_directory']:
  8.         file(os.path.join(tools.config['test_report_directory'], 'account-invoice-hu.'+format), 'wb+').write(data)
Advertisement
Add Comment
Please, Sign In to add comment