4 In Order to test the delivery report I create picking with move lines.
6 !record {model: stock.picking, id: stock_picking_delivery}:
9 address_id: base.res_partner_address_4
10 company_id: base.main_company
11 date: '2010-05-11 15:18:52'
14 - company_id: base.main_company
15 date: '2010-05-11 15:18:57'
16 location_dest_id: stock.stock_location_customers
17 location_id: stock.stock_location_stock
19 product_id: product.product_product_pc1
21 product_uom: product.product_uom_unit
22 date: '2010-05-11 15:18:57'
30 In order to test the PDF reports defined on a Delievry, we will print a Delivery Order report
32 !python {model: stock.picking}: |
33 import netsvc, tools, os
34 (data, format) = netsvc.LocalService('report.sale.shipping').create(cr, uid, [ref('stock_picking_delivery')], {}, {})
35 if tools.config['test_report_directory']:
36 file(os.path.join(tools.config['test_report_directory'], 'delievry-shipping'+format), 'wb+').write(data)