diff --git a/tests/scenario_invoice.rst b/tests/scenario_invoice.rst index 3756fdbb9f..13e7d7e508 100644 --- a/tests/scenario_invoice.rst +++ b/tests/scenario_invoice.rst @@ -85,6 +85,16 @@ Create party:: >>> party = Party(name='Party') >>> party.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.customer_taxes.append(tax) + >>> account_category.save() + Create product:: >>> ProductUom = Model.get('product.uom') @@ -95,9 +105,7 @@ Create product:: >>> template.default_uom = unit >>> template.type = 'service' >>> template.list_price = Decimal('40') - >>> template.account_expense = expense - >>> template.account_revenue = revenue - >>> template.customer_taxes.append(tax) + >>> template.account_category = account_category >>> template.save() >>> product, = template.products diff --git a/tests/scenario_invoice_alternate_currency.rst b/tests/scenario_invoice_alternate_currency.rst index f4b3d9699a..6e7ee55409 100644 --- a/tests/scenario_invoice_alternate_currency.rst +++ b/tests/scenario_invoice_alternate_currency.rst @@ -84,6 +84,16 @@ Create party:: >>> party = Party(name='Party') >>> party.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.customer_taxes.append(tax) + >>> account_category.save() + Create product:: >>> ProductUom = Model.get('product.uom') @@ -94,9 +104,7 @@ Create product:: >>> template.default_uom = unit >>> template.type = 'service' >>> template.list_price = Decimal('40') - >>> template.account_expense = expense - >>> template.account_revenue = revenue - >>> template.customer_taxes.append(tax) + >>> template.account_category = account_category >>> template.save() >>> product, = template.products diff --git a/tests/scenario_invoice_supplier.rst b/tests/scenario_invoice_supplier.rst index 557ef52f4f..7fabc928dd 100644 --- a/tests/scenario_invoice_supplier.rst +++ b/tests/scenario_invoice_supplier.rst @@ -62,6 +62,16 @@ Create party:: >>> party = Party(name='Party') >>> party.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(tax) + >>> account_category.save() + Create product:: >>> ProductUom = Model.get('product.uom') @@ -72,9 +82,7 @@ Create product:: >>> template.default_uom = unit >>> template.type = 'service' >>> template.list_price = Decimal('40') - >>> template.account_expense = expense - >>> template.account_revenue = revenue - >>> template.supplier_taxes.append(tax) + >>> template.account_category = account_category >>> template.save() >>> product, = template.products