diff --git a/tests/scenario_stock_consignment.rst b/tests/scenario_stock_consignment.rst index eb43f28c13..004681528b 100644 --- a/tests/scenario_stock_consignment.rst +++ b/tests/scenario_stock_consignment.rst @@ -71,6 +71,17 @@ Create customer consignment location:: >>> customer_consignment_loc.consignment_party = customer >>> customer_consignment_loc.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.supplier_taxes.append(supplier_tax) + >>> account_category.customer_taxes.append(customer_tax) + >>> account_category.save() + Create product:: >>> ProductUom = Model.get('product.uom') @@ -85,10 +96,7 @@ Create product:: >>> template.purchasable = True >>> template.salable = True >>> template.list_price = Decimal('10') - >>> template.account_expense = expense - >>> template.account_revenue = revenue - >>> template.supplier_taxes.append(supplier_tax) - >>> template.customer_taxes.append(customer_tax) + >>> template.account_category = account_category >>> product_supplier = template.product_suppliers.new() >>> product_supplier.party = supplier >>> price = product_supplier.prices.new()