[ADD,IMP]stock :

Add a yml file for define test cases of scrap move
Improve the stock_demo_backorder.yml file

bzr revid: dbr@tinyerp.com-20111121130718-3q67e1pyafcrzttk
This commit is contained in:
DBR (OpenERP)
2011-11-21 18:37:18 +05:30
parent a169f9ee17
commit 9b921998af
3 changed files with 26 additions and 5 deletions
+2 -2
View File
@@ -85,8 +85,8 @@ Thanks to the double entry management, the inventory controlling is powerful and
'test/process/update_stock.yml',
#'test/stock_report.yml',
#'test/stock_test_wizard.yml',
#'test/process/stock_demo_backorder.yml',
#'test/process/stock_incoming_shipment.yml',
'test/process/stock_demo_backorder.yml',
'test/process/scrap_move.yml',
],
'installable': True,
'active': False,
+24
View File
@@ -0,0 +1,24 @@
-
In order to test the scrap move, I add create a new move line in draft state with FAN2
-
!record {model: stock.move, id: stock_move_4}:
product_id: product.product_product_fan2
product_qty: 4.0
location_dest_id: stock.stock_location_customers
location_id: stock.stock_location_stock
-
Now, withe help of 'Scrap Move' wizard, I scap the move of same Quantity.
-
!python {model: stock.move.scrap}: |
context = {'active_model':'stock.move', 'active_id': ref('stock_move_4'), 'active_ids': [ref('stock_move_4')]}
values = self.default_get(cr, uid, ['location_id','product_id','product_uom','product_qty'], context)
ids = self.create(cr, uid, values)
self.move_scrap(cr, uid, [ids], context)
-
I check Scraped Move details.
-
!python {model: stock.move}: |
ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_fan2'))])
for scrap_move in self.browse(cr, uid, ids):
if scrap_move.product_qty == 4.0 and scrap_move.location_dest_id == ref('stock_location_scrapped'):
assert scrap_move.state == 'done',"The scraped move should be in Done state"
@@ -11,12 +11,9 @@
-
!record {model: stock.move, id: stock_move_3}:
product_id: product.product_product_fan2
product_uom: product.product_uom_unit
product_uos_qty: 7.0
product_qty: 7.0
location_dest_id: stock.stock_location_customers
location_id: stock.stock_location_stock
name: CPU3, Processor AMD Athlon XP 1800
picking_id: stock_picking_1
- |
I click on 'Process Now' to process the delivery order and I change quantities to: