From 09223f79c885248faeabd3d96668b53c367802dd Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Sat, 18 Aug 2018 23:54:42 +0200 Subject: [PATCH] Remove accounts from products. --- tests/test_account_invoice_facturae.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/test_account_invoice_facturae.py b/tests/test_account_invoice_facturae.py index cdcc1ee..b71ccb7 100644 --- a/tests/test_account_invoice_facturae.py +++ b/tests/test_account_invoice_facturae.py @@ -26,13 +26,12 @@ class TestAccountInvoiceFacturaeCase(ModuleTestCase): pool = Pool() Account = pool.get('account.account') FiscalYear = pool.get('account.fiscalyear') - GenerateSignedFacturae = pool.get('account.invoice.generate_facturae', - type='wizard') Invoice = pool.get('account.invoice') InvoiceLine = pool.get('account.invoice.line') Party = pool.get('party.party') PaymentTerm = pool.get('account.invoice.payment_term') ProductUom = pool.get('product.uom') + ProductCategory = pool.get('product.category') ProductTemplate = pool.get('product.template') Product = pool.get('product.product') Tax = pool.get('account.tax') @@ -161,16 +160,22 @@ class TestAccountInvoiceFacturaeCase(ModuleTestCase): }])], }]) + + account_category = ProductCategory() + account_category.name = 'Account Category' + account_category.accounting = True + account_category.account_expense = expense + account_category.account_revenue = revenue + account_category.customer_taxes = [vat21] + account_category.save() + unit, = ProductUom.search([('name', '=', 'Unit')]) template = ProductTemplate() template.name = 'product' template.default_uom = unit template.type = 'service' template.list_price = Decimal('40') - template.cost_price = Decimal('25') - template.account_expense = expense - template.account_revenue = revenue - template.customer_taxes = [vat21] + template.account_category = account_category template.save() product = Product() product.template = template