Account DO Scenario =================== Imports:: >>> from proteus import Model >>> from trytond.modules.account.tests.tools import create_chart >>> from trytond.modules.company.tests.tools import create_company, get_company >>> from trytond.tests.tools import activate_modules Install account_do:: >>> config = activate_modules('account_do', create_company) Get the test company:: >>> company = get_company() Create the Dominican chart of accounts:: >>> _ = create_chart(company, chart='account_do.do_account_root') >>> Account = Model.get('account.account') >>> receivable, = Account.find([ ... ('company', '=', company.id), ... ('code', '=', '110201'), ... ('type.receivable', '=', True)]) >>> payable, = Account.find([ ... ('company', '=', company.id), ... ('code', '=', '210101'), ... ('type.payable', '=', True)]) >>> bool(receivable.party_required) True >>> bool(payable.party_required) True Validate fiscal objects:: >>> Tax = Model.get('account.tax') >>> TaxCode = Model.get('account.tax.code') >>> TaxRule = Model.get('account.tax.rule') >>> bool(Tax.find([ ... ('company', '=', company.id), ... ('description', '=', 'ITBIS 18% Ventas'), ... ('tax_kind', '=', 'itbis')])) True >>> bool(TaxCode.find([ ... ('company', '=', company.id), ... ('name', '=', 'Otros Impuestos y Contribuciones')])) True >>> bool(TaxRule.find([ ... ('company', '=', company.id), ... ('kind', '=', 'sale')])) True >>> bool(TaxRule.find([ ... ('company', '=', company.id), ... ('kind', '=', 'purchase')])) True