From 799e478d18b16be5ce54eab886b5c15f7eec53a8 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 17 Sep 2010 11:22:02 +0530 Subject: [PATCH] [IMP] stock : YML test for report and demo data added bzr revid: ach@tinyerp.com-20100917055202-watsndx8n2biait4 --- addons/stock/stock_demo.xml | 8 +++- .../test/stock_inventory_move_report.yml | 8 ---- .../stock/test/stock_lot_location_report.yml | 8 ---- addons/stock/test/stock_overview_report.yml | 8 ---- .../stock/test/stock_overviewall_report.yml | 8 ---- addons/stock/test/stock_report.yml | 48 +++++++++++++++++++ 6 files changed, 55 insertions(+), 33 deletions(-) delete mode 100644 addons/stock/test/stock_inventory_move_report.yml delete mode 100644 addons/stock/test/stock_lot_location_report.yml delete mode 100644 addons/stock/test/stock_overview_report.yml delete mode 100644 addons/stock/test/stock_overviewall_report.yml create mode 100644 addons/stock/test/stock_report.yml diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index 6607d97b2b3..03a29838981 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -270,6 +270,12 @@ - + + PACKO1 + out + direct + 2binvoiced + + diff --git a/addons/stock/test/stock_inventory_move_report.yml b/addons/stock/test/stock_inventory_move_report.yml deleted file mode 100644 index a92db995427..00000000000 --- a/addons/stock/test/stock_inventory_move_report.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on stock inventory, we will print a Stock Inventory Move report -- - !python {model: stock.inventory}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.stock.inventory.move').create(cr, uid, [ref('stock.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) diff --git a/addons/stock/test/stock_lot_location_report.yml b/addons/stock/test/stock_lot_location_report.yml deleted file mode 100644 index d31bdf620d4..00000000000 --- a/addons/stock/test/stock_lot_location_report.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on stock location, we will print a lot location report -- - !python {model: stock.location}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.lot.location').create(cr, uid, [ref('stock.stock_location_components')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'stock-stock_lot_location.'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_overview_report.yml b/addons/stock/test/stock_overview_report.yml deleted file mode 100644 index 22d75625a63..00000000000 --- a/addons/stock/test/stock_overview_report.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on a stock, we will print a Stock Overview report -- - !python {model: stock.location}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.lot.stock.overview').create(cr, uid, [ref('stock.stock_location_14')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'stock-overview'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_overviewall_report.yml b/addons/stock/test/stock_overviewall_report.yml deleted file mode 100644 index 8f3bb61d044..00000000000 --- a/addons/stock/test/stock_overviewall_report.yml +++ /dev/null @@ -1,8 +0,0 @@ -- - In order to test the PDF reports defined on a stock, we will print a Stock Overviewall(childs) report -- - !python {model: stock.location}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('stock.stock_location_13')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data) diff --git a/addons/stock/test/stock_report.yml b/addons/stock/test/stock_report.yml new file mode 100644 index 00000000000..491fd7fa9d7 --- /dev/null +++ b/addons/stock/test/stock_report.yml @@ -0,0 +1,48 @@ +- + In order to test the PDF reports defined on a stock, we will print a Stock Overviewall(childs) report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.stock.overview_all').create(cr, uid, [ref('stock.stock_location_13')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-overviewall'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on stock location, we will print a lot location report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.location').create(cr, uid, [ref('stock.stock_location_components')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-stock_lot_location.'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on stock inventory, we will print a Stock Inventory Move report +- + !python {model: stock.inventory}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.inventory.move').create(cr, uid, [ref('stock.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) +- + In order to test the PDF reports defined on a stock, we will print a Stock Overview report +- + !python {model: stock.location}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.lot.stock.overview').create(cr, uid, [ref('stock.stock_location_14')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-overview'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a stock, we will print a Stock Picking List report +- + !python {model: stock.picking}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.picking.list').create(cr, uid, [ref('stock.stock_picking_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-picking_list'+format), 'wb+').write(data) +- + In order to test the PDF reports defined on a Stock, we will print Product Stock Report +- + !python {model: product.product}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.stock.product.history').create(cr, uid, [ref('product.product_product_pc1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'stock-product_stock_report.'+format), 'wb+').write(data) \ No newline at end of file