From 0f5d59fe0b62dd7e9dd91c7e302b8eae6270d3b9 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Sat, 18 Aug 2018 23:22:50 +0200 Subject: [PATCH] Remove accounts from products. --- tests/scenario_purchase_request_pending.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/scenario_purchase_request_pending.rst b/tests/scenario_purchase_request_pending.rst index a73caf1..aa1d07c 100644 --- a/tests/scenario_purchase_request_pending.rst +++ b/tests/scenario_purchase_request_pending.rst @@ -45,6 +45,15 @@ Create parties:: >>> customer = Party(name='Customer') >>> customer.save() +Create account category:: + + >>> ProductCategory = Model.get('product.category') + >>> account_category = ProductCategory(name="Account Category") + >>> account_category.accounting = True + >>> account_category.account_expense = expense + >>> account_category.account_revenue = revenue + >>> account_category.save() + Create product:: >>> ProductUom = Model.get('product.uom') @@ -57,9 +66,8 @@ Create 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.account_category = account_category >>> template.save() >>> product.template = template >>> product.save()