From 82ad59a5c428eaffdba6a2c2149cd6aece62e613 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Tue, 4 Sep 2018 00:50:27 +0200 Subject: [PATCH] Remove accounts from products --- tests/scenario_stock_distribution_in.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/scenario_stock_distribution_in.rst b/tests/scenario_stock_distribution_in.rst index f1e3b74..f16d0fc 100644 --- a/tests/scenario_stock_distribution_in.rst +++ b/tests/scenario_stock_distribution_in.rst @@ -69,6 +69,15 @@ Get stock locations:: >>> storage_loc, = Location.find([('code', '=', 'STO')]) >>> production_loc, = Location.find([('code', '=', 'PROD')]) +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') @@ -80,8 +89,7 @@ Create product:: >>> template.type = 'goods' >>> template.list_price = Decimal('20') >>> template.purchasable = True - >>> template.account_expense = expense - >>> template.account_revenue = revenue + >>> template.account_category = account_category >>> template.save() >>> product, = template.products >>> location = product.locations.new()