diff --git a/tests/scenario_purchase_request.rst b/tests/scenario_purchase_request.rst index 301206e4a0..db4b044710 100644 --- a/tests/scenario_purchase_request.rst +++ b/tests/scenario_purchase_request.rst @@ -89,20 +89,19 @@ 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 + >>> product, = template.products + >>> product.cost_price = Decimal('8') >>> template.save() - >>> product.template = template - >>> product.save() + >>> product, = template.products Get stock locations::