[IMP] product : yml report test for product added

bzr revid: jma@tinyerp.com-20100916093329-zwqovzfx671mdcdy
This commit is contained in:
JMA (OpenERP) 2010-09-16 15:03:29 +05:30
parent a084c48967
commit 9a239296dd
2 changed files with 18 additions and 0 deletions

View File

@ -58,6 +58,7 @@
'company_view.xml',
'process/product_process.xml'
],
'test':['test/product_report.yml'],
'installable': True,
'active': False,
'certificate': '0068861431437',

View File

@ -0,0 +1,17 @@
-
In order to test the PDF reports defined on Products, we will print a Products Pricelists report
-
!python {model: product.product}: |
import netsvc, tools, os
data_dict = {'model': 'product.price_list'}
data_dict['form'] = {
'qty1': 1,
'qty2': 5,
'qty3': 10,
'qty4': 0,
'qty5': 0,
'price_list':ref('product.list0')
}
(data, format) = netsvc.LocalService('report.product.pricelist').create(cr, uid, [ref('product.product_product_pc1'), ref('product.product_product_pc3')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'product-product pricelist'+format), 'wb+').write(data)