[IMP] Adding test reports in YML files, to generate sample of reports

bzr revid: fp@tinyerp.com-20100912120859-s0qjlxt1wqx76lbr
This commit is contained in:
Fabien Pinckaers 2010-09-12 14:08:59 +02:00
parent 8431b70597
commit 2f97ff0188
2 changed files with 21 additions and 12 deletions

View File

@ -69,19 +69,20 @@
],
'demo_xml': ['sale_demo.xml'],
'test': [
'test/data_test.yml',
'test/manual_order_policy.yml',
'test/prepaid_order_policy.yml',
'test/picking_order_policy.yml',
'test/postpaid_order_policy.yml',
'test/advance_invoice.yml',
'test/so_make_line_invoice.yml',
'test/sale_procurement.yml',
'test/invoice_on_ordered_qty.yml',
'test/invoice_on_shipped_qty.yml',
],
'test/data_test.yml',
'test/manual_order_policy.yml',
'test/prepaid_order_policy.yml',
'test/picking_order_policy.yml',
'test/postpaid_order_policy.yml',
'test/advance_invoice.yml',
'test/so_make_line_invoice.yml',
'test/sale_procurement.yml',
'test/invoice_on_ordered_qty.yml',
'test/invoice_on_shipped_qty.yml',
'test/sale_order_print.yml',
],
'installable': True,
'active': False,
'certificate': '0058103601429',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,8 @@
-
In order to test the PDF reports defined on a sale order, we will print a sale order
-
!python {model: sale.order}: |
import netsvc, tools, os
(data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.order'),ref('sale.order2')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data)