From 0ebd738ef61e68b720d07c31822f55a442c1fb15 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Mon, 2 Sep 2013 17:27:00 +0200 Subject: [PATCH] [FIX] stock: inventory yaml test bzr revid: qdp-launchpad@openerp.com-20130902152700-sfbrf2v07kf5ld9a --- addons/stock/test/inventory.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/stock/test/inventory.yml b/addons/stock/test/inventory.yml index f36aab303d3..6afc7e9d4ba 100644 --- a/addons/stock/test/inventory.yml +++ b/addons/stock/test/inventory.yml @@ -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." -