From 20498ba8164f4e24de6068aec24fd6b616f70e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 5 Jul 2017 14:51:47 +0200 Subject: [PATCH] Move cost price to product level instead of template issue6515 review41321002 --- tests/scenario_project_invoice_effort.rst | 7 ++----- tests/scenario_project_invoice_progress.rst | 7 ++----- tests/scenario_project_invoice_timesheet.rst | 7 ++----- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/tests/scenario_project_invoice_effort.rst b/tests/scenario_project_invoice_effort.rst index 182f2ba6bf..2f51fd1c8f 100644 --- a/tests/scenario_project_invoice_effort.rst +++ b/tests/scenario_project_invoice_effort.rst @@ -83,19 +83,16 @@ Create product:: >>> ProductUom = Model.get('product.uom') >>> hour, = ProductUom.find([('name', '=', 'Hour')]) - >>> Product = Model.get('product.product') >>> ProductTemplate = Model.get('product.template') - >>> product = Product() + >>> template = ProductTemplate() >>> template.name = 'Service' >>> template.default_uom = hour >>> template.type = 'service' >>> template.list_price = Decimal('20') - >>> template.cost_price = Decimal('5') >>> template.account_revenue = revenue >>> template.save() - >>> product.template = template - >>> product.save() + >>> product, = template.products Create a Project:: diff --git a/tests/scenario_project_invoice_progress.rst b/tests/scenario_project_invoice_progress.rst index 1230565eda..37cf66c184 100644 --- a/tests/scenario_project_invoice_progress.rst +++ b/tests/scenario_project_invoice_progress.rst @@ -83,19 +83,16 @@ Create product:: >>> ProductUom = Model.get('product.uom') >>> hour, = ProductUom.find([('name', '=', 'Hour')]) - >>> Product = Model.get('product.product') >>> ProductTemplate = Model.get('product.template') - >>> product = Product() + >>> template = ProductTemplate() >>> template.name = 'Service' >>> template.default_uom = hour >>> template.type = 'service' >>> template.list_price = Decimal('20') - >>> template.cost_price = Decimal('5') >>> template.account_revenue = revenue >>> template.save() - >>> product.template = template - >>> product.save() + >>> product, = template.products Create a Project:: diff --git a/tests/scenario_project_invoice_timesheet.rst b/tests/scenario_project_invoice_timesheet.rst index 500d7fd57a..f43118dda2 100644 --- a/tests/scenario_project_invoice_timesheet.rst +++ b/tests/scenario_project_invoice_timesheet.rst @@ -83,19 +83,16 @@ Create product:: >>> ProductUom = Model.get('product.uom') >>> hour, = ProductUom.find([('name', '=', 'Hour')]) - >>> Product = Model.get('product.product') >>> ProductTemplate = Model.get('product.template') - >>> product = Product() + >>> template = ProductTemplate() >>> template.name = 'Service' >>> template.default_uom = hour >>> template.type = 'service' >>> template.list_price = Decimal('20') - >>> template.cost_price = Decimal('5') >>> template.account_revenue = revenue >>> template.save() - >>> product.template = template - >>> product.save() + >>> product, = template.products Create a Project::