From 1741a6d5d1a5af06cf85ee024e6b1cd972e576dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 5 Jul 2017 14:51:48 +0200 Subject: [PATCH] Move cost price to product level instead of template issue6515 review41321002 --- tests/scenario_sale.rst | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/scenario_sale.rst b/tests/scenario_sale.rst index 38747d26cc..cca88fdc71 100644 --- a/tests/scenario_sale.rst +++ b/tests/scenario_sale.rst @@ -97,8 +97,7 @@ Create product:: >>> ProductUom = Model.get('product.uom') >>> unit, = ProductUom.find([('name', '=', 'Unit')]) >>> ProductTemplate = Model.get('product.template') - >>> Product = Model.get('product.product') - >>> product = Product() + >>> template = ProductTemplate() >>> template.name = 'product' >>> template.default_uom = unit @@ -106,29 +105,22 @@ Create product:: >>> template.purchasable = True >>> template.salable = True >>> template.list_price = Decimal('10') - >>> template.cost_price = Decimal('5') - >>> template.cost_price_method = 'fixed' >>> template.account_expense = expense >>> template.account_revenue = revenue >>> template.customer_taxes.append(tax) >>> template.save() - >>> product.template = template - >>> product.save() + >>> product, = template.products - >>> service = Product() >>> template = ProductTemplate() >>> template.name = 'service' >>> template.default_uom = unit >>> template.type = 'service' >>> template.salable = True >>> template.list_price = Decimal('30') - >>> template.cost_price = Decimal('10') - >>> template.cost_price_method = 'fixed' >>> template.account_expense = expense >>> template.account_revenue = revenue >>> template.save() - >>> service.template = template - >>> service.save() + >>> service, = template.products Create payment term::