|
|
|
@@ -8,7 +8,7 @@
|
|
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'mrp-bom_order.'+format), 'wb+').write(data)
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
In order to test the PDF reports defined on a mrp, we will print a order
|
|
|
|
|
In order to test the PDF reports defined on a mrp, we will print an order
|
|
|
|
|
-
|
|
|
|
|
!python {model: mrp.production}: |
|
|
|
|
|
import netsvc, tools, os
|
|
|
|
@@ -17,10 +17,19 @@
|
|
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'mrp-production_order.'+format), 'wb+').write(data)
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
In order to test the PDF reports defined on a mrp, we will print a (mrp)Product-price order
|
|
|
|
|
In order to test the PDF reports defined on a mrp product price, we will print a (mrp)Product Price order
|
|
|
|
|
-
|
|
|
|
|
!python {model: product.product}: |
|
|
|
|
|
import netsvc, tools, os
|
|
|
|
|
(data, format) = netsvc.LocalService('report.product.price').create(cr, uid, [ref('product.product_product_0'), ref('product.product_product_pc2'), ref('product.product_product_cpu1'), ref('product.product_product_hdd1'), ref('product.product_product_fan'), ref('product.product_product_cpu1'), ref('product.product_product_ram512')], {}, {})
|
|
|
|
|
(data, format) = netsvc.LocalService('report.product.price').create(cr, uid, [1,2,3,5], {'model':'product.product', 'form':{'number': 1}}, {})
|
|
|
|
|
if tools.config['test_report_directory']:
|
|
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'mrp-production-price_order.'+format), 'wb+').write(data)
|
|
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'mrp_product-price_order.'+format), 'wb+').write(data)
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
In order to test the PDF reports defined on a mrp workcenter, we will print a (mrp)workcenter
|
|
|
|
|
-
|
|
|
|
|
!python {model: mrp.workcenter}: |
|
|
|
|
|
import netsvc, tools, os, time
|
|
|
|
|
(data, format) = netsvc.LocalService('report.mrp.workcenter.load').create(cr, uid, [ref('mrp_workcenter_0'),ref('mrp_workcenter_1')], {'model':'mrp.workcenter', 'form':{'time_unit': 'day', 'measure_unit': 'hours'}}, {})
|
|
|
|
|
if tools.config['test_report_directory']:
|
|
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'mrp_workcenter.'+format), 'wb+').write(data)
|
|
|
|
|