diff --git a/tests/scenario_stock_internal_supply.rst b/tests/scenario_stock_internal_supply.rst index 66ff8b289b..eba8fab1a7 100644 --- a/tests/scenario_stock_internal_supply.rst +++ b/tests/scenario_stock_internal_supply.rst @@ -61,18 +61,15 @@ Create product:: >>> config.user = product_admin_user.id >>> ProductUom = Model.get('product.uom') >>> ProductTemplate = Model.get('product.template') - >>> Product = Model.get('product.product') >>> unit, = ProductUom.find([('name', '=', 'Unit')]) - >>> product = Product() + >>> template = ProductTemplate() >>> template.name = 'Product' >>> template.default_uom = unit >>> template.type = 'goods' >>> template.list_price = Decimal('20') - >>> template.cost_price = Decimal('8') >>> template.save() - >>> product.template = template - >>> product.save() + >>> product, = template.products Get stock locations:: diff --git a/tests/scenario_stock_internal_supply_lead_time.rst b/tests/scenario_stock_internal_supply_lead_time.rst index f71bbc036a..0ef69329b9 100644 --- a/tests/scenario_stock_internal_supply_lead_time.rst +++ b/tests/scenario_stock_internal_supply_lead_time.rst @@ -33,18 +33,15 @@ Create product:: >>> ProductUom = Model.get('product.uom') >>> ProductTemplate = Model.get('product.template') - >>> Product = Model.get('product.product') >>> unit, = ProductUom.find([('name', '=', 'Unit')]) - >>> product = Product() + >>> template = ProductTemplate() >>> template.name = 'Product' >>> template.default_uom = unit >>> template.type = 'goods' >>> template.list_price = Decimal('20') - >>> template.cost_price = Decimal('8') >>> template.save() - >>> product.template = template - >>> product.save() + >>> product, = template.products Get stock locations:: diff --git a/tests/scenario_stock_internal_supply_overflow.rst b/tests/scenario_stock_internal_supply_overflow.rst index 704d9be2c9..c310a52976 100644 --- a/tests/scenario_stock_internal_supply_overflow.rst +++ b/tests/scenario_stock_internal_supply_overflow.rst @@ -26,18 +26,15 @@ Create product:: >>> ProductUom = Model.get('product.uom') >>> ProductTemplate = Model.get('product.template') - >>> Product = Model.get('product.product') >>> unit, = ProductUom.find([('name', '=', 'Unit')]) - >>> product = Product() + >>> template = ProductTemplate() >>> template.name = 'Product' >>> template.default_uom = unit >>> template.type = 'goods' >>> template.list_price = Decimal('20') - >>> template.cost_price = Decimal('8') >>> template.save() - >>> product.template = template - >>> product.save() + >>> product, = template.products Get stock locations:: diff --git a/tests/scenario_stock_supply_purchase_request.rst b/tests/scenario_stock_supply_purchase_request.rst index bc25df7c26..372a448c0e 100644 --- a/tests/scenario_stock_supply_purchase_request.rst +++ b/tests/scenario_stock_supply_purchase_request.rst @@ -89,20 +89,17 @@ Create product:: >>> config.user = product_admin_user.id >>> ProductUom = Model.get('product.uom') >>> ProductTemplate = Model.get('product.template') - >>> Product = Model.get('product.product') >>> unit, = ProductUom.find([('name', '=', 'Unit')]) - >>> product = Product() + >>> template = ProductTemplate() >>> template.name = 'Product' >>> template.default_uom = unit >>> template.type = 'goods' >>> template.list_price = Decimal('20') - >>> template.cost_price = Decimal('8') >>> template.purchasable = True >>> template.account_expense = expense >>> template.save() - >>> product.template = template - >>> product.save() + >>> product, = template.products Get stock locations:: diff --git a/tests/test_stock_supply.py b/tests/test_stock_supply.py index b334f19e26..951b8faf15 100644 --- a/tests/test_stock_supply.py +++ b/tests/test_stock_supply.py @@ -90,7 +90,6 @@ class StockSupplyTestCase(ModuleTestCase): 'name': 'ProductTest', 'default_uom': uom.id, 'list_price': Decimal(0), - 'cost_price': Decimal(0), }]) product, = Product.create([{ 'template': template.id,