-
  Stock user can print all reports related to stock, so let's check data with giving the access rights of user.
-
  !context
    uid: 'res_users_stock_user'
-
  I print a stock overview report of location.
-
  !python {model: stock.location}: |
    import netsvc, tools, os
    (data, format) = netsvc.LocalService('report.lot.stock.overview').create(cr, uid, [ref('location_monitor')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'stock-overview'+format), 'wb+').write(data)
-
  I print a Stock Overview report of location with child location.
-
  !python {model: stock.location}: |
    import netsvc, tools, os
    (data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('location_monitor')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data)
-
  I print a Stock Inventory report.
-
  !python {model: stock.inventory}: |
    import netsvc, tools, os
    (data, format) = netsvc.LocalService('report.stock.inventory.move').create(cr, uid, [ref('stock_inventory_0')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'stock-stock_inventory_move.'+format), 'wb+').write(data)
-
  I print a outgoing shipment report.
-
  !python {model: stock.picking}: |
    import netsvc, tools, os
    (data, format) = netsvc.LocalService('report.stock.picking.list').create(cr, uid, [ref('outgoing_shipment')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'stock-picking_list'+format), 'wb+').write(data)
-
  I print stock Report.
-
  !python {model: product.product}: |
    import netsvc, tools, os
    (data, format) = netsvc.LocalService('report.stock.product.history').create(cr, uid, [ref('product_product_6')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'stock-product_stock_report.'+format), 'wb+').write(data)

