[IMP] stock : YML test for report and demo data added

bzr revid: ach@tinyerp.com-20100917055202-watsndx8n2biait4
This commit is contained in:
Anup (OpenERP) 2010-09-17 11:22:02 +05:30
parent 02a9c6f837
commit 799e478d18
6 changed files with 55 additions and 33 deletions

View File

@ -270,6 +270,12 @@
<field eval="'account.account,'+str(ref('account.a_recv'))" model="account.account" name="value"/>
<field name="company_id" ref="base.main_company"/>
</record>
<record id="stock_picking_1" model="stock.picking">
<field name="name">PACKO1</field>
<field name="type">out</field>
<field name="move_type">direct</field>
<field name="invoice_state">2binvoiced</field>
<field name="company_id" ref="base.main_company"/>
</record>
</data>
</openerp>

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)