[FIX] stock: inventory yaml test
bzr revid: qdp-launchpad@openerp.com-20130902152700-sfbrf2v07kf5ld9a
This commit is contained in:
parent
8cf4c8d311
commit
0ebd738ef6
|
@ -53,17 +53,17 @@
|
|||
-
|
||||
!python {model: product.product}: |
|
||||
context['location'] = ref('stock.stock_location_14')
|
||||
product = self.browse(cr, uid, ref('product.product_product_3'), context=context)
|
||||
product = self.browse(cr, uid, ref('inventory_product'), context=context)
|
||||
assert product.qty_available == 10, 'Expecting 10 products, got %.2f on location stock_location_14!' % (product.qty_available,)
|
||||
context['location'] = ref('stock.stock_location_stock')
|
||||
product = self.browse(cr, uid, ref('product.product_product_3'), context=context)
|
||||
product = self.browse(cr, uid, ref('inventory_product'), context=context)
|
||||
assert product.qty_available == 10, 'Expecting 10 products, got %.2f on location stock_location_stock!' % (product.qty_available,)
|
||||
-
|
||||
I check that the quantity on hand is 0 on a brother location
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
context['location'] = ref('stock.stock_location_components')
|
||||
product = self.browse(cr, uid, ref('product.product_product_3'), context=context)
|
||||
product = self.browse(cr, uid, ref('inventory_product'), context=context)
|
||||
assert product.qty_available == 0, 'Expecting 0 products, got %.2f on location stock_location_components!' % (product.qty_available,)
|
||||
-
|
||||
I create another inventory
|
||||
|
@ -82,7 +82,7 @@
|
|||
-
|
||||
!python {model: stock.inventory}: |
|
||||
inv = self.browse(cr, uid, ref('inventory_test1'), context=context)
|
||||
assert len(inv.line_ids) == 1, "Wrong number of inventory lines."
|
||||
assert inv.line_ids and len(inv.line_ids) == 1, "Wrong number of inventory lines."
|
||||
assert len(inv.line_ids[0].product_qty) == 10, "Wrong quantity in inventory line."
|
||||
assert len(inv.line_ids[0].product_id.id) == ref('inventory_product'), "Wrong product in inventory line."
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue