-
  In order to test the PDF reports defined on a Point Of Sale,we will print a POS Detail Summary Report
-
  !python {model: pos.order}: |
    import netsvc, tools, os
    (data, format) = netsvc.LocalService('report.pos.details_summary').create(cr, uid, [ref('point_of_sale.pos_order_pos1')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-details_summary report'+format), 'wb+').write(data)

-
  In order to test the PDF reports defined on a Point Of Sale, we will print a POS Invoice Report
-
  !python {model: pos.order}: |
    import netsvc, tools, os
    (data, format) = netsvc.LocalService('report.pos.invoice').create(cr, uid, [ref('point_of_sale.pos_order_pos1')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-invoice report'+format), 'wb+').write(data)

-
  In order to test the PDF reports defined on a Point Of Sale, we will print a POS Lines Report
-
  !python {model: pos.order}: |
    import netsvc, tools, os
    (data, format) = netsvc.LocalService('report.pos.lines').create(cr, uid, [ref('point_of_sale.pos_order_pos1')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-lines report'+format), 'wb+').write(data)

-
  In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt Report
-
  !python {model: pos.order}: |
    import netsvc, tools, os
    (data, format) = netsvc.LocalService('report.pos.receipt').create(cr, uid, [ref('point_of_sale.pos_order_pos1')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt report'+format), 'wb+').write(data)

-
  Print the POS Details Report through the wizard
-
  !python {model: ir.ui.menu}: |
    import time
    ctx={}
    ctx.update({'model': 'ir.ui.menu','active_ids': []})
    data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_ids': [(6,0,[ref('base.user_root')])]}
    from tools import test_reports
    test_reports.try_report_action(cr, uid, 'action_report_pos_details',wiz_data=data_dict, context=ctx, our_module='point_of_sale')

-
  In order to test the PDF reports defined on a Point of Sale, we will print a POS Sales User Report
-
  !python {model: pos.order}: |
    import netsvc, tools, os, time
    data_dict = {'model':'ir.ui.menu', 'form':{'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'),'user_id':[ref('base.user_root')] }}
    (data, format) = netsvc.LocalService('report.pos.sales.user').create(cr, uid, [ref('point_of_sale.pos_order_pos1')], data_dict, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-sales_user_report'+format), 'wb+').write(data)
-
  In order to test the PDF reports defined on a Point of Sale, we will print a POS Payment Report
-
  !python {model: pos.order}: |
    import netsvc, tools, os, time
    (data, format) = netsvc.LocalService('report.pos.payment.report').create(cr, uid, [ref('point_of_sale.pos_order_pos0')], {}, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_report'+format), 'wb+').write(data)
-
  In order to test the PDF reports defined on a Point of Sale, we will print a POS Payment User Report
-
  !python {model: pos.order}: |
    import netsvc, tools, os, time
    data_dict = {'model':'ir.ui.menu', 'form':{'user_id':[ref('base.user_root'),ref('base.user_demo')] }}
    (data, format) = netsvc.LocalService('report.pos.payment.report.user').create(cr, uid, [ref('point_of_sale.pos_order_pos1')], data_dict, {})
    if tools.config['test_report_directory']:
        file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-payment_user_report'+format), 'wb+').write(data)
