2010-09-15 12:34:52 +00:00
|
|
|
-
|
2010-09-17 12:50:36 +00:00
|
|
|
In order to test the PDF reports defined on a MRP Repair, we will print an Order Report
|
2010-09-15 12:34:52 +00:00
|
|
|
-
|
|
|
|
!python {model: mrp.repair}: |
|
|
|
|
import netsvc, tools, os
|
2011-12-21 12:57:53 +00:00
|
|
|
(data, format) = netsvc.LocalService('report.repair.order').create(cr, uid, [ref('mrp_repair.mrp_repair_rmrp0')], {}, {})
|
2010-09-15 12:34:52 +00:00
|
|
|
if tools.config['test_report_directory']:
|
2010-09-17 12:50:36 +00:00
|
|
|
file(os.path.join(tools.config['test_report_directory'], 'mrp_repair-order_report.'+format), 'wb+').write(data)
|