Create company and chart of account when activate modules in test scenario
This commit is contained in:
@@ -9,29 +9,24 @@ Imports::
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> Account = Model.get('account.account')
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[1]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> Account = Model.get('account.account')
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
Check active without start or end date::
|
||||
|
||||
@@ -9,35 +9,29 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> party_required = globals().get('party_required', True)
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Line = Model.get('account.move.line')
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> Party = Model.get('party.party')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -9,33 +9,27 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Line = Model.get('account.move.line')
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> Party = Model.get('party.party')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create parties::
|
||||
|
||||
|
||||
@@ -9,30 +9,24 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual, assertTrue
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> GLLine = Model.get('account.general_ledger.line')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -17,7 +17,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Configuration = Model.get('account.configuration')
|
||||
>>> Journal = Model.get('account.journal')
|
||||
@@ -30,19 +30,14 @@ Create currencies::
|
||||
>>> usd = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company(currency=usd)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Configure currency exchange::
|
||||
|
||||
+2
-7
@@ -17,7 +17,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Configuration = Model.get('account.configuration')
|
||||
>>> Journal = Model.get('account.journal')
|
||||
@@ -31,19 +31,14 @@ Create currencies::
|
||||
>>> usd = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company(currency=usd)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Configure currency exchange::
|
||||
|
||||
@@ -15,7 +15,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Move = Model.get('account.move')
|
||||
@@ -25,18 +25,13 @@ Create currencies::
|
||||
>>> usd = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company(currency=usd)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
>>> account = accounts['cash']
|
||||
>>> account.reconcile = True
|
||||
|
||||
@@ -12,7 +12,7 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
@@ -20,7 +20,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Account = Model.get('account.account')
|
||||
>>> AccountType = Model.get('account.account.type')
|
||||
@@ -31,21 +31,15 @@ Activate modules::
|
||||
>>> Period = Model.get('account.period')
|
||||
>>> Sequence = Model.get('ir.sequence')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, today=last_year)
|
||||
>>> fiscalyear = create_fiscalyear(today=last_year)
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Prepare the closing settings for fiscalyear close::
|
||||
|
||||
|
||||
@@ -9,31 +9,25 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Reconciliation = Model.get('account.move.reconciliation')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
|
||||
@@ -15,25 +15,20 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> Party = Model.get('party.party')
|
||||
|
||||
Create a company::
|
||||
|
||||
>>> _ = create_company()
|
||||
|
||||
Create a fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create a chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create a party::
|
||||
|
||||
@@ -9,35 +9,32 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> Party = Model.get('party.party')
|
||||
|
||||
Create company::
|
||||
Get currencies::
|
||||
|
||||
>>> usd = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=usd)
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create parties::
|
||||
|
||||
|
||||
@@ -11,31 +11,28 @@ Imports::
|
||||
>>> from trytond.modules.account.exceptions import CancelDelegatedWarning
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
Create company::
|
||||
Get currency::
|
||||
|
||||
>>> usd = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=usd)
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> payable = accounts['payable']
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
@@ -11,36 +11,33 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Line = Model.get('account.move.line')
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> Party = Model.get('party.party')
|
||||
|
||||
Create company::
|
||||
Get currencies::
|
||||
|
||||
>>> usd = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=usd)
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, create_tax, create_tax_code, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import (
|
||||
... activate_modules, assertEqual, assertGreaterEqual, assertLessEqual)
|
||||
|
||||
@@ -18,23 +18,17 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period_ids = [p.id for p in fiscalyear.periods]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> payable = accounts['payable']
|
||||
>>> expense = accounts['expense']
|
||||
>>> tax = accounts['tax']
|
||||
|
||||
@@ -6,21 +6,16 @@ Imports::
|
||||
|
||||
>>> from proteus import Wizard
|
||||
>>> from trytond.modules.account.tests.tools import create_fiscalyear
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account', create_company)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods.new()
|
||||
>>> period.name = 'Adjustment'
|
||||
|
||||
@@ -17,24 +17,20 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, today)
|
||||
>>> fiscalyear = create_fiscalyear(today=today)
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> periods = fiscalyear.periods
|
||||
>>> period_1, period_3, period_5 = periods[0], periods[2], periods[4]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -9,28 +9,22 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, create_tax, create_tax_code, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create tax code::
|
||||
|
||||
|
||||
@@ -14,28 +14,22 @@ Imports::
|
||||
>>> from trytond.modules.account_asset.tests.tools import add_asset_accounts
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... create_payment_term, set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_asset')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_asset', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = add_asset_accounts(get_accounts(company), company)
|
||||
>>> accounts = add_asset_accounts(get_accounts())
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> asset_account = accounts['asset']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -14,28 +14,22 @@ Imports::
|
||||
>>> from trytond.modules.account_asset.tests.tools import add_asset_accounts
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_asset')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_asset', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = add_asset_accounts(get_accounts(company), company)
|
||||
>>> accounts = add_asset_accounts(get_accounts())
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> asset_account = accounts['asset']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -12,28 +12,23 @@ Imports::
|
||||
>>> from trytond.modules.account_asset.tests.tools import add_asset_accounts
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_asset', 'purchase'])
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules(
|
||||
... ['account_asset', 'purchase'], create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = add_asset_accounts(get_accounts(company), company)
|
||||
>>> accounts = add_asset_accounts(get_accounts())
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> asset_account = accounts['asset']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -9,12 +9,12 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_budget')
|
||||
>>> config = activate_modules('account_budget', create_company, create_chart)
|
||||
|
||||
>>> Account = Model.get('account.account')
|
||||
>>> Budget = Model.get('account.budget')
|
||||
@@ -23,14 +23,9 @@ Activate modules::
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> Party = Model.get('party.party')
|
||||
|
||||
Create a company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create a fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
@@ -38,10 +33,9 @@ Create a fiscal year::
|
||||
>>> renew_fiscalyear.execute('create_')
|
||||
>>> next_fiscalyear, = renew_fiscalyear.actions[0]
|
||||
|
||||
Create a chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create the parties::
|
||||
|
||||
|
||||
@@ -11,30 +11,27 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_cash_rounding', 'account_invoice'])
|
||||
>>> config = activate_modules(
|
||||
... ['account_cash_rounding', 'account_invoice'], create_company, create_chart)
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> Account = Model.get('account.account')
|
||||
>>> AccountConfig = Model.get('account.configuration')
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> Account = Model.get('account.account')
|
||||
>>> AccountConfig = Model.get('account.configuration')
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Set cash rounding::
|
||||
|
||||
@@ -52,7 +49,7 @@ Set cash rounding::
|
||||
>>> account_config.cash_rounding_debit_account = cash_rounding_debit
|
||||
>>> account_config.save()
|
||||
|
||||
>>> currency = company.currency
|
||||
>>> currency = get_currency()
|
||||
>>> currency.cash_rounding = Decimal('0.05')
|
||||
>>> currency.save()
|
||||
|
||||
|
||||
+8
-13
@@ -11,14 +11,17 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_cash_rounding', 'account_invoice'])
|
||||
>>> config = activate_modules(
|
||||
... ['account_cash_rounding', 'account_invoice'], create_company, create_chart)
|
||||
|
||||
>>> Account = Model.get('account.account')
|
||||
>>> AccountConfig = Model.get('account.configuration')
|
||||
>>> Configuration = Model.get('account.configuration')
|
||||
|
||||
Set alternate currencies::
|
||||
@@ -26,23 +29,15 @@ Set alternate currencies::
|
||||
>>> currency = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company(currency=currency)
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> Account = Model.get('account.account')
|
||||
>>> AccountConfig = Model.get('account.configuration')
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Configure currency exchange::
|
||||
|
||||
|
||||
@@ -9,25 +9,22 @@ Imports::
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import create_chart, get_accounts
|
||||
>>> from trytond.modules.account_invoice.tests.tools import create_payment_term
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(
|
||||
... ['account_cash_rounding', 'account_invoice', 'purchase'])
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create chart of accounts::
|
||||
... ['account_cash_rounding', 'account_invoice', 'purchase'],
|
||||
... create_company, create_chart)
|
||||
|
||||
>>> Account = Model.get('account.account')
|
||||
>>> AccountConfig = Model.get('account.configuration')
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
|
||||
Get accounts::
|
||||
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> Configuration = Model.get('account.configuration')
|
||||
>>> config = Configuration(1)
|
||||
@@ -36,7 +33,7 @@ Create chart of accounts::
|
||||
|
||||
Set cash rounding::
|
||||
|
||||
>>> currency = company.currency
|
||||
>>> currency = get_currency()
|
||||
>>> currency.cash_rounding = Decimal('0.05')
|
||||
>>> currency.save()
|
||||
|
||||
|
||||
@@ -9,25 +9,22 @@ Imports::
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import create_chart, get_accounts
|
||||
>>> from trytond.modules.account_invoice.tests.tools import create_payment_term
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(
|
||||
... ['account_cash_rounding', 'account_invoice', 'sale'])
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create chart of accounts::
|
||||
... ['account_cash_rounding', 'account_invoice', 'sale'],
|
||||
... create_company, create_chart)
|
||||
|
||||
>>> Account = Model.get('account.account')
|
||||
>>> AccountConfig = Model.get('account.configuration')
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
|
||||
Get accounts::
|
||||
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Set cash rounding::
|
||||
|
||||
@@ -45,7 +42,7 @@ Set cash rounding::
|
||||
>>> account_config.cash_rounding_debit_account = cash_rounding_debit
|
||||
>>> account_config.save()
|
||||
|
||||
>>> currency = company.currency
|
||||
>>> currency = get_currency()
|
||||
>>> currency.cash_rounding = Decimal('0.05')
|
||||
>>> currency.save()
|
||||
|
||||
|
||||
@@ -12,28 +12,22 @@ Imports::
|
||||
>>> from trytond.modules.account_deposit.tests.tools import add_deposit_accounts
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... create_payment_term, set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_deposit')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_deposit', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = add_deposit_accounts(get_accounts(company))
|
||||
>>> accounts = add_deposit_accounts(get_accounts())
|
||||
|
||||
Create party::
|
||||
|
||||
|
||||
@@ -22,16 +22,15 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_deposit')
|
||||
>>> config = activate_modules('account_deposit', create_company, create_chart)
|
||||
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
|
||||
Create company::
|
||||
Get currencies::
|
||||
|
||||
>>> currency = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=currency)
|
||||
|
||||
Set alternate currency rates::
|
||||
|
||||
@@ -48,9 +47,8 @@ Create fiscal year::
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = add_deposit_accounts(get_accounts())
|
||||
>>> accounts['deposit'].second_currency = eur
|
||||
>>> accounts['deposit'].save()
|
||||
|
||||
@@ -12,7 +12,7 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import (
|
||||
... activate_modules, assertEqual, assertTrue, set_user)
|
||||
|
||||
@@ -20,12 +20,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_dunning')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_dunning', create_company, create_chart)
|
||||
|
||||
Create account admin user::
|
||||
|
||||
@@ -62,14 +57,13 @@ Create dunning user::
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
@@ -10,28 +10,22 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_dunning')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_dunning', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
@@ -12,7 +12,7 @@ Imports::
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_dunning_email import account
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Patch send_message_transactional::
|
||||
@@ -24,25 +24,20 @@ Patch send_message_transactional::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_dunning_email')
|
||||
>>> config = activate_modules(
|
||||
... 'account_dunning_email', create_company, create_chart)
|
||||
|
||||
>>> Email = Model.get('ir.email')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
@@ -10,17 +10,12 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_dunning_fee')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_dunning_fee', create_company, create_chart)
|
||||
|
||||
Reload the context::
|
||||
|
||||
@@ -30,14 +25,13 @@ Reload the context::
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> Journal = Model.get('account.journal')
|
||||
|
||||
@@ -10,17 +10,13 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, set_user
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_dunning_letter')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules(
|
||||
... 'account_dunning_letter', create_company, create_chart)
|
||||
|
||||
Reload the context::
|
||||
|
||||
@@ -61,14 +57,13 @@ Create dunning user::
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
@@ -5,6 +5,7 @@ Account ES EC Operation List Scenario
|
||||
Imports::
|
||||
|
||||
>>> from decimal import Decimal
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
@@ -16,11 +17,12 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_es')
|
||||
>>> config = activate_modules(
|
||||
... 'account_es',
|
||||
... create_company, partial(create_chart, chart='account_es.pgc_0_pyme'))
|
||||
|
||||
Create company::
|
||||
Setup company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> tax_identifier = company.party.identifiers.new()
|
||||
>>> tax_identifier.type = 'eu_vat'
|
||||
@@ -30,14 +32,13 @@ Create company::
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company, 'account_es.pgc_0_pyme')
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> expense = accounts['expense']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model, Report, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
@@ -18,11 +19,12 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_es')
|
||||
>>> config = activate_modules(
|
||||
... 'account_es',
|
||||
... create_company, partial(create_chart, chart='account_es.pgc_0_pyme'))
|
||||
|
||||
Create company::
|
||||
Setup company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> tax_identifier = company.party.identifiers.new()
|
||||
>>> tax_identifier.type = 'eu_vat'
|
||||
@@ -35,14 +37,13 @@ Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(
|
||||
... company, (dt.date(2018, 1, 1), dt.date(2018, 12, 31))))
|
||||
... today=(dt.date(2018, 1, 1), dt.date(2018, 12, 31))))
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company, 'account_es.pgc_0_pyme')
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> expense = accounts['expense']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
@@ -20,25 +21,25 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_es')
|
||||
>>> config = activate_modules(
|
||||
... 'account_es',
|
||||
... create_company, partial(create_chart, chart='account_es.pgc_0_pyme'))
|
||||
|
||||
Create company::
|
||||
Get company::
|
||||
|
||||
>>> currency = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=currency)
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart(company, 'account_es.pgc_0_pyme')
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> expense = accounts['expense']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ Account ES Reporting Cancelled Invoices Scenario
|
||||
Imports::
|
||||
|
||||
>>> from decimal import Decimal
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
@@ -16,11 +17,12 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_es')
|
||||
>>> config = activate_modules(
|
||||
... 'account_es',
|
||||
... create_company, partial(create_chart, chart='account_es.pgc_0_pyme'))
|
||||
|
||||
Create company::
|
||||
Setup company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> tax_identifier = company.party.identifiers.new()
|
||||
>>> tax_identifier.type = 'eu_vat'
|
||||
@@ -30,14 +32,13 @@ Create company::
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company, 'account_es.pgc_0_pyme')
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> expense = accounts['expense']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
@@ -18,11 +19,12 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_es', 'account_invoice'])
|
||||
>>> config = activate_modules(
|
||||
... ['account_es', 'account_invoice'],
|
||||
... create_company, partial(create_chart, chart='account_es.pgc_0_pyme'))
|
||||
|
||||
Create company::
|
||||
Setup company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> tax_identifier = company.party.identifiers.new()
|
||||
>>> tax_identifier.type = 'eu_vat'
|
||||
@@ -33,15 +35,14 @@ Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(
|
||||
... company, (dt.date(2018, 1, 1), dt.date(2018, 12, 31))))
|
||||
... today=(dt.date(2018, 1, 1), dt.date(2018, 12, 31))))
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> previous_period = fiscalyear.periods[0]
|
||||
>>> period = fiscalyear.periods[1]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company, 'account_es.pgc_0_pyme')
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> expense = accounts['expense']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model, Report
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
@@ -18,11 +19,12 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_es')
|
||||
>>> config = activate_modules(
|
||||
... 'account_es',
|
||||
... create_company, partial(create_chart, chart='account_es.pgc_0_pyme'))
|
||||
|
||||
Create company::
|
||||
Setup company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> tax_identifier = company.party.identifiers.new()
|
||||
>>> tax_identifier.type = 'eu_vat'
|
||||
@@ -36,10 +38,9 @@ Create fiscal year::
|
||||
... company, (dt.date(2020, 1, 1), dt.date(2020, 12, 31))))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company, 'account_es.pgc_0_pyme')
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> expense = accounts['expense']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
|
||||
@@ -8,21 +8,16 @@ Imports::
|
||||
>>> from trytond.modules.account.tests.tools import create_fiscalyear
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_es_sii')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_es_sii', create_company)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(fiscalyear)
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
|
||||
@@ -14,26 +14,21 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_export')
|
||||
>>> config = activate_modules('account_export', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> MoveExport = Model.get('account.move.export')
|
||||
>>> Party = Model.get('party.party')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create party::
|
||||
|
||||
@@ -21,7 +21,8 @@ Imports::
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(
|
||||
... ['account_export_winbooks', 'account_statement'])
|
||||
... ['account_export_winbooks', 'account_statement'],
|
||||
... create_company, create_chart)
|
||||
>>> config.skip_warning = True
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
@@ -31,13 +32,8 @@ Activate modules::
|
||||
>>> Statement = Model.get('account.statement')
|
||||
>>> StatementJournal = Model.get('account.statement.journal')
|
||||
|
||||
Create company::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_company()
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> accounts['payable'].winbooks_code = '440000'
|
||||
|
||||
@@ -17,11 +17,10 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_fr')
|
||||
>>> config = activate_modules('account_fr', create_company, create_chart)
|
||||
|
||||
Create company::
|
||||
Setup company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> siren = company.party.identifiers.new(type='fr_siren')
|
||||
>>> siren.code = '820043784'
|
||||
@@ -30,21 +29,20 @@ Create company::
|
||||
Create last year fiscal year::
|
||||
|
||||
>>> fiscalyear_previous = create_fiscalyear(
|
||||
... company, (dt.date(2017, 1, 1), dt.date(2017, 12, 31)))
|
||||
... today=(dt.date(2017, 1, 1), dt.date(2017, 12, 31)))
|
||||
>>> fiscalyear_previous.click('create_period')
|
||||
>>> period_previous = fiscalyear_previous.periods[0]
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(
|
||||
... company, (dt.date(2018, 1, 1), dt.date(2018, 12, 31)))
|
||||
... today=(dt.date(2018, 1, 1), dt.date(2018, 12, 31)))
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -9,6 +9,7 @@ Imports::
|
||||
>>> import time
|
||||
>>> import uuid
|
||||
>>> from decimal import Decimal
|
||||
>>> from functools import partial
|
||||
>>> from unittest.mock import patch
|
||||
|
||||
>>> from proteus import Model
|
||||
@@ -17,7 +18,6 @@ Imports::
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.modules.party.party import Identifier
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
@@ -32,7 +32,8 @@ Patch SIRET validation::
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules([
|
||||
... 'account_fr_chorus', 'edocument_uncefact', 'account_fr'])
|
||||
... 'account_fr_chorus', 'edocument_uncefact', 'account_fr'],
|
||||
... create_company, partial(create_chart, chart='account_fr.root'))
|
||||
|
||||
>>> AccountConfig = Model.get('account.configuration')
|
||||
>>> Cron = Model.get('ir.cron')
|
||||
@@ -41,9 +42,8 @@ Activate modules::
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> Tax = Model.get('account.tax')
|
||||
|
||||
Create company::
|
||||
Setup company::
|
||||
|
||||
>>> _ = create_company(currency=get_currency('EUR'))
|
||||
>>> company = get_company()
|
||||
>>> company_party = company.party
|
||||
>>> company_address, = company_party.addresses
|
||||
@@ -60,9 +60,8 @@ Create fiscal year::
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(chart='account_fr.root')
|
||||
>>> acccounts = get_accounts()
|
||||
|
||||
>>> tax, = Tax.find([
|
||||
|
||||
@@ -12,12 +12,13 @@ Imports::
|
||||
>>> from trytond.modules.account_invoice.exceptions import CancelInvoiceMoveWarning
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> ProductCategory = Model.get('product.category')
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
@@ -25,21 +26,15 @@ Activate modules::
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> Warning = Model.get('res.user.warning')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create party::
|
||||
|
||||
|
||||
@@ -11,28 +11,22 @@ Imports::
|
||||
... create_chart, create_fiscalyear, create_tax, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -19,11 +19,10 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create company::
|
||||
Setup company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> tax_identifier = company.party.identifiers.new()
|
||||
>>> tax_identifier.type = 'eu_vat'
|
||||
@@ -47,15 +46,14 @@ Set employee::
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
>>> period_ids = [p.id for p in fiscalyear.periods]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -13,7 +13,7 @@ Imports::
|
||||
>>> from trytond.modules.account_invoice.exceptions import InvoiceTaxesWarning
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
@@ -22,16 +22,14 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
>>> Warning = Model.get('res.user.warning')
|
||||
|
||||
Create company::
|
||||
Get currencies::
|
||||
|
||||
>>> currency = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=currency)
|
||||
>>> company = get_company()
|
||||
|
||||
Set alternate currency rates::
|
||||
|
||||
@@ -46,13 +44,12 @@ Set alternate currency rates::
|
||||
Create fiscal years::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, (today, tomorrow)))
|
||||
... create_fiscalyear(today=(today, tomorrow)))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
>>> account_tax = accounts['tax']
|
||||
|
||||
@@ -20,18 +20,17 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
>>> Configuration = Model.get('account.configuration')
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> PaymentTerm = Model.get('account.invoice.payment_term')
|
||||
|
||||
Create company::
|
||||
Get currencies::
|
||||
|
||||
>>> currency = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=currency)
|
||||
|
||||
Set alternate currency rates::
|
||||
|
||||
@@ -44,9 +43,8 @@ Create fiscal years::
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Configure currency exchange::
|
||||
|
||||
@@ -12,7 +12,7 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
@@ -20,14 +20,12 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create company::
|
||||
Get currencies::
|
||||
|
||||
>>> currency = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=currency)
|
||||
>>> company = get_company()
|
||||
|
||||
Set alternate currency rates::
|
||||
|
||||
@@ -39,13 +37,12 @@ Set alternate currency rates::
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create payment method::
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
>>> Configuration = Model.get('account.configuration')
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
@@ -29,11 +29,10 @@ Activate modules::
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> PaymentMethod = Model.get('account.invoice.payment.method')
|
||||
|
||||
Create company::
|
||||
Get currencies::
|
||||
|
||||
>>> currency = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=currency)
|
||||
|
||||
Set alternate currency rates::
|
||||
|
||||
@@ -51,9 +50,8 @@ Create fiscal year::
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Configure currency exchange::
|
||||
|
||||
@@ -11,33 +11,27 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> PaymentMethod = Model.get('account.invoice.payment.method')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> journal_cash, = Journal.find([
|
||||
... ('code', '=', 'CASH'),
|
||||
|
||||
@@ -12,7 +12,7 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
@@ -20,27 +20,21 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create fiscal years::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, past_year))
|
||||
... create_fiscalyear(today=past_year))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
>>> renew_fiscalyear = Wizard('account.fiscalyear.renew')
|
||||
>>> renew_fiscalyear.execute('create_')
|
||||
>>> next_fiscalyear, = renew_fiscalyear.actions[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create party::
|
||||
|
||||
|
||||
@@ -11,29 +11,23 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> payable = accounts['payable']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
@@ -12,7 +12,7 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
@@ -20,23 +20,17 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, (today, tomorrow)))
|
||||
... create_fiscalyear(today=(today, tomorrow)))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
Create party::
|
||||
|
||||
@@ -12,35 +12,29 @@ Imports::
|
||||
... create_chart, create_fiscalyear, create_tax, create_tax_code, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> TaxCode = Model.get('account.tax.code')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period_ids = [p.id for p in fiscalyear.periods]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create tax::
|
||||
|
||||
|
||||
@@ -11,28 +11,22 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create fiscal years::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create payment method::
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> Journal = Model.get('account.journal')
|
||||
@@ -31,22 +31,16 @@ Activate modules::
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> Sequence = Model.get('ir.sequence')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create party::
|
||||
|
||||
|
||||
@@ -11,33 +11,27 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> PaymentMethod = Model.get('account.invoice.payment.method')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> journal_cash, = Journal.find([
|
||||
... ('code', '=', 'CASH'),
|
||||
|
||||
@@ -12,31 +12,25 @@ Imports::
|
||||
... create_chart, create_fiscalyear, create_tax, create_tax_code, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period_ids = [p.id for p in fiscalyear.periods]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> payable = accounts['payable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -12,31 +12,25 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> payable = accounts['payable']
|
||||
>>> expense = accounts['expense']
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
@@ -13,14 +13,14 @@ Imports::
|
||||
>>> from trytond.modules.account_invoice.exceptions import InvoiceTaxesWarning
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> Party = Model.get('party.party')
|
||||
@@ -29,21 +29,15 @@ Activate modules::
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> Warning = Model.get('res.user.warning')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create tax::
|
||||
|
||||
|
||||
@@ -11,29 +11,23 @@ Imports::
|
||||
... create_chart, create_fiscalyear, create_tax, create_tax_code, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_invoice', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period_ids = [p.id for p in fiscalyear.periods]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create tax::
|
||||
|
||||
|
||||
@@ -10,24 +10,19 @@ Imports::
|
||||
>>> from trytond.modules.account.tests.tools import create_fiscalyear
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_invoice', create_company)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> InvoiceSequence = Model.get('account.fiscalyear.invoice_sequence')
|
||||
>>> fiscalyear = create_fiscalyear(company, today)
|
||||
>>> fiscalyear = create_fiscalyear(today=today)
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(fiscalyear)
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> inv_seq, = fiscalyear.invoice_sequences
|
||||
|
||||
@@ -11,29 +11,23 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice_correction')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> company.party.save()
|
||||
>>> config = activate_modules(
|
||||
... 'account_invoice_correction', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
Create party::
|
||||
|
||||
@@ -14,14 +14,15 @@ Imports::
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.account_invoice_defer.tests.tools import (
|
||||
... add_deferred_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice_defer')
|
||||
>>> config = activate_modules(
|
||||
... 'account_invoice_defer', create_company, create_chart)
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> InvoiceDeferred = Model.get('account.invoice.deferred')
|
||||
@@ -29,22 +30,16 @@ Activate modules::
|
||||
>>> ProductCategory = Model.get('product.category')
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = add_deferred_accounts(get_accounts(company))
|
||||
>>> accounts = add_deferred_accounts(get_accounts())
|
||||
|
||||
Create party::
|
||||
|
||||
|
||||
@@ -11,28 +11,24 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice_stock')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules(
|
||||
... 'account_invoice_stock', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create a party::
|
||||
|
||||
@@ -81,7 +77,7 @@ Create a shipment::
|
||||
>>> move.from_location = output_loc
|
||||
>>> move.to_location = customer_loc
|
||||
>>> move.unit_price = Decimal('40.0000')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.currency = get_currency()
|
||||
>>> shipment.click('wait')
|
||||
>>> shipment.state
|
||||
'waiting'
|
||||
|
||||
@@ -12,14 +12,16 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice_stock')
|
||||
>>> config = activate_modules(
|
||||
... 'account_invoice_stock', create_company, create_chart)
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> Location = Model.get('stock.location')
|
||||
@@ -30,21 +32,15 @@ Activate modules::
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> Shipment = Model.get('stock.shipment.in')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create a party::
|
||||
|
||||
@@ -86,7 +82,7 @@ Create a shipment::
|
||||
>>> move.from_location = supplier_loc
|
||||
>>> move.to_location = input_loc
|
||||
>>> move.unit_price = Decimal('40.0000')
|
||||
>>> move.currency = company.currency
|
||||
>>> move.currency = get_currency()
|
||||
>>> shipment.click('receive')
|
||||
>>> shipment.state
|
||||
'received'
|
||||
|
||||
@@ -12,12 +12,13 @@ Imports::
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.account_invoice_watermark.tests.tools import pdf_contains
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_invoice_watermark')
|
||||
>>> config = activate_modules(
|
||||
... 'account_invoice_watermark', create_company, create_chart)
|
||||
|
||||
>>> ActionReport = Model.get('ir.action.report')
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
@@ -33,21 +34,15 @@ Convert invoice report to PDF::
|
||||
>>> invoice_report.extension = 'pdf'
|
||||
>>> invoice_report.save()
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create payment method::
|
||||
|
||||
|
||||
@@ -10,12 +10,13 @@ Imports::
|
||||
>>> from trytond import backend
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_move_line_grouping')
|
||||
>>> config = activate_modules(
|
||||
... 'account_move_line_grouping', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Line = Model.get('account.move.line')
|
||||
@@ -23,21 +24,15 @@ Activate modules::
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> Party = Model.get('party.party')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> journal_revenue, = Journal.find([
|
||||
... ('code', '=', "REV"),
|
||||
|
||||
@@ -10,7 +10,7 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> today = dt.date.today()
|
||||
@@ -18,12 +18,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_payment', create_company, create_chart)
|
||||
|
||||
Set employee::
|
||||
|
||||
@@ -41,13 +36,12 @@ Set employee::
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, (today, tomorrow))
|
||||
>>> fiscalyear = create_fiscalyear(today=(today, tomorrow))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> payable = accounts['payable']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment')
|
||||
>>> config = activate_modules('account_payment', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Line = Model.get('account.move.line')
|
||||
@@ -26,20 +26,14 @@ Activate modules::
|
||||
>>> Payment = Model.get('account.payment')
|
||||
>>> PaymentJournal = Model.get('account.payment.journal')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> revnue_journal, = Journal.find([('code', '=', 'REV')])
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual, assertIsNotNone
|
||||
|
||||
>>> today = dt.date.today()
|
||||
@@ -19,7 +19,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment')
|
||||
>>> config = activate_modules('account_payment', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Move = Model.get('account.move')
|
||||
@@ -27,20 +27,14 @@ Activate modules::
|
||||
>>> Payment = Model.get('account.payment')
|
||||
>>> PaymentJournal = Model.get('account.payment.journal')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, (today, after_tomorrow))
|
||||
>>> fiscalyear = create_fiscalyear(today=(today, after_tomorrow))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> revnue_journal, = Journal.find([('code', '=', 'REV')])
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment')
|
||||
>>> config = activate_modules('account_payment', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Move = Model.get('account.move')
|
||||
@@ -25,18 +25,13 @@ Activate modules::
|
||||
>>> Payment = Model.get('account.payment')
|
||||
>>> PaymentJournal = Model.get('account.payment.journal')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> revnue_journal, = Journal.find([('code', '=', 'REV')])
|
||||
|
||||
@@ -10,14 +10,15 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_payment', 'account_dunning'])
|
||||
>>> config = activate_modules(
|
||||
... ['account_payment', 'account_dunning'], create_company, create_chart)
|
||||
|
||||
>>> Dunning = Model.get('account.dunning')
|
||||
>>> Journal = Model.get('account.journal')
|
||||
@@ -26,21 +27,15 @@ Activate modules::
|
||||
>>> PaymentJournal = Model.get('account.payment.journal')
|
||||
>>> Procedure = Model.get('account.dunning.procedure')
|
||||
|
||||
Create company::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> expense_journal, = Journal.find([('code', '=', 'EXP')])
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, today)
|
||||
>>> fiscalyear = create_fiscalyear(today=today)
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create dunning procedure::
|
||||
|
||||
@@ -11,28 +11,22 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_payment', 'account_invoice'])
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules(
|
||||
... ['account_payment', 'account_invoice'], create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> payable = accounts['payable']
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
@@ -10,7 +10,7 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> today = dt.date.today()
|
||||
@@ -19,22 +19,16 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_payment', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, (today, next_week))
|
||||
>>> fiscalyear = create_fiscalyear(today=(today, next_week))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> payable = accounts['payable']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_payment', 'account_statement'])
|
||||
>>> config = activate_modules(
|
||||
... ['account_payment', 'account_statement'], create_company, create_chart)
|
||||
|
||||
>>> AccountJournal = Model.get('account.journal')
|
||||
>>> Party = Model.get('party.party')
|
||||
@@ -28,19 +29,14 @@ Activate modules::
|
||||
>>> Statement = Model.get('account.statement')
|
||||
>>> StatementJournal = Model.get('account.statement.journal')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create journals::
|
||||
|
||||
@@ -10,14 +10,14 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment')
|
||||
>>> config = activate_modules('account_payment', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Move = Model.get('account.move')
|
||||
@@ -25,20 +25,14 @@ Activate modules::
|
||||
>>> Payment = Model.get('account.payment')
|
||||
>>> PaymentJournal = Model.get('account.payment.journal')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
>>> expense_journal, = Journal.find([('code', '=', 'EXP')])
|
||||
>>> cash_journal, = Journal.find([('code', '=', 'CASH')])
|
||||
|
||||
@@ -18,27 +18,23 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment_braintree')
|
||||
>>> config = activate_modules(
|
||||
... 'account_payment_braintree', create_company, create_chart)
|
||||
|
||||
Get cron::
|
||||
|
||||
>>> Cron = Model.get('ir.cron')
|
||||
|
||||
Create company::
|
||||
Get company::
|
||||
|
||||
>>> Company = Model.get('company.company')
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
|
||||
Create Braintree account::
|
||||
|
||||
>>> BraintreeAccount = Model.get('account.payment.braintree.account')
|
||||
|
||||
+6
-11
@@ -10,29 +10,24 @@ Imports::
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_payment_clearing'])
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules(
|
||||
... 'account_payment_clearing', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> payable = accounts['payable']
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
@@ -22,23 +22,23 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_payment_clearing', 'account_statement'])
|
||||
>>> config = activate_modules(
|
||||
... ['account_payment_clearing', 'account_statement'],
|
||||
... create_company, create_chart)
|
||||
|
||||
Create company::
|
||||
Get company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, (yesterday, first)))
|
||||
... create_fiscalyear(today=(yesterday, first)))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
+6
-11
@@ -11,29 +11,24 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(
|
||||
... ['account_payment_clearing', 'account_invoice'])
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
... ['account_payment_clearing', 'account_invoice'],
|
||||
... create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company))
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> expense = accounts['expense']
|
||||
|
||||
@@ -22,23 +22,14 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment_stripe')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> Company = Model.get('company.company')
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules(
|
||||
... 'account_payment_stripe', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, today)
|
||||
>>> fiscalyear = create_fiscalyear(today=today)
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
|
||||
Create Stripe account::
|
||||
|
||||
>>> StripeAccount = Model.get('account.payment.stripe.account')
|
||||
@@ -65,7 +56,7 @@ Setup fetch events cron::
|
||||
>>> cron_fetch_events, = Cron.find([
|
||||
... ('method', '=', 'account.payment.stripe.account|fetch_events'),
|
||||
... ])
|
||||
>>> cron_fetch_events.companies.append(Company(company.id))
|
||||
>>> cron_fetch_events.companies.append(get_company())
|
||||
|
||||
Create payment journal::
|
||||
|
||||
@@ -192,7 +183,7 @@ Run cron::
|
||||
>>> cron_customer_create, = Cron.find([
|
||||
... ('method', '=', 'account.payment.stripe.customer|stripe_create'),
|
||||
... ])
|
||||
>>> cron_customer_create.companies.append(Company(company.id))
|
||||
>>> cron_customer_create.companies.append(get_company())
|
||||
>>> cron_customer_create.click('run_once')
|
||||
|
||||
>>> stripe_customer.reload()
|
||||
@@ -262,7 +253,7 @@ Run cron::
|
||||
>>> cron_customer_delete, = Cron.find([
|
||||
... ('method', '=', 'account.payment.stripe.customer|stripe_delete'),
|
||||
... ])
|
||||
>>> cron_customer_delete.companies.append(Company(company.id))
|
||||
>>> cron_customer_delete.companies.append(get_company())
|
||||
>>> cron_customer_delete.click('run_once')
|
||||
|
||||
>>> stripe_customer.reload()
|
||||
|
||||
@@ -22,22 +22,17 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment_stripe')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> Company = Model.get('company.company')
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules(
|
||||
... 'account_payment_stripe', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, today)
|
||||
>>> fiscalyear = create_fiscalyear(today=today)
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> _ = create_chart()
|
||||
|
||||
Create Stripe account::
|
||||
|
||||
@@ -54,7 +49,7 @@ Setup fetch events cron::
|
||||
>>> cron_fetch_events, = Cron.find([
|
||||
... ('method', '=', 'account.payment.stripe.account|fetch_events'),
|
||||
... ])
|
||||
>>> cron_fetch_events.companies.append(Company(company.id))
|
||||
>>> cron_fetch_events.companies.append(get_company())
|
||||
|
||||
Create payment journal::
|
||||
|
||||
|
||||
@@ -17,16 +17,15 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment_stripe')
|
||||
>>> config = activate_modules('account_payment_stripe', create_company)
|
||||
|
||||
>>> Company = Model.get('company.company')
|
||||
>>> Cron = Model.get('ir.cron')
|
||||
>>> StripeAccount = Model.get('account.payment.stripe.account')
|
||||
>>> StripeCustomer = Model.get('account.payment.stripe.customer')
|
||||
|
||||
Create company::
|
||||
Get company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create Stripe account::
|
||||
|
||||
@@ -22,23 +22,19 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment_stripe')
|
||||
>>> config = activate_modules(
|
||||
... 'account_payment_stripe', create_company, create_chart)
|
||||
|
||||
Create company::
|
||||
Get company::
|
||||
|
||||
>>> Company = Model.get('company.company')
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, today)
|
||||
>>> fiscalyear = create_fiscalyear(today=today)
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
|
||||
Create Stripe account::
|
||||
|
||||
>>> StripeAccount = Model.get('account.payment.stripe.account')
|
||||
|
||||
+4
-13
@@ -21,28 +21,19 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_payment_stripe')
|
||||
>>> config = activate_modules(
|
||||
... 'account_payment_stripe', create_company, create_chart)
|
||||
|
||||
>>> Company = Model.get('company.company')
|
||||
>>> Cron = Model.get('ir.cron')
|
||||
>>> Payment = Model.get('account.payment')
|
||||
>>> Refund = Model.get('account.payment.stripe.refund')
|
||||
>>> StripeAccount = Model.get('account.payment.stripe.account')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company, today)
|
||||
>>> fiscalyear = create_fiscalyear(today=today)
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
|
||||
Create Stripe account::
|
||||
|
||||
>>> stripe_account = StripeAccount(name="Stripe")
|
||||
@@ -56,7 +47,7 @@ Setup fetch events cron::
|
||||
>>> cron_fetch_events, = Cron.find([
|
||||
... ('method', '=', 'account.payment.stripe.account|fetch_events'),
|
||||
... ])
|
||||
>>> cron_fetch_events.companies.append(Company(company.id))
|
||||
>>> cron_fetch_events.companies.append(get_company())
|
||||
|
||||
Create payment journal::
|
||||
|
||||
|
||||
@@ -9,33 +9,28 @@ Imports::
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_receivable_rule')
|
||||
>>> config = activate_modules(
|
||||
... 'account_receivable_rule', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> ReceivableRule = Model.get('account.account.receivable.rule')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create multiple receivable::
|
||||
|
||||
|
||||
+6
-11
@@ -9,33 +9,28 @@ Imports::
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_receivable_rule')
|
||||
>>> config = activate_modules(
|
||||
... 'account_receivable_rule', create_company, create_chart)
|
||||
|
||||
>>> Journal = Model.get('account.journal')
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> Move = Model.get('account.move')
|
||||
>>> ReceivableRule = Model.get('account.account.receivable.rule')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = create_fiscalyear(company)
|
||||
>>> fiscalyear = create_fiscalyear()
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create multiple receivable::
|
||||
|
||||
|
||||
+4
-7
@@ -16,7 +16,9 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_receivable_rule', 'account_statement'])
|
||||
>>> config = activate_modules(
|
||||
... ['account_receivable_rule', 'account_statement'],
|
||||
... create_company, create_chart)
|
||||
|
||||
>>> AccountJournal = Model.get('account.journal')
|
||||
>>> Journal = Model.get('account.journal')
|
||||
@@ -26,19 +28,14 @@ Activate modules::
|
||||
>>> Statement = Model.get('account.statement')
|
||||
>>> StatementJournal = Model.get('account.statement.journal')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
>>> period = fiscalyear.periods[0]
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create multiple receivable::
|
||||
|
||||
@@ -9,12 +9,14 @@ Imports::
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_tax, get_accounts)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_rule', 'product', 'sale'])
|
||||
>>> config = activate_modules(
|
||||
... ['account_rule', 'product', 'sale'],
|
||||
... create_company, create_chart)
|
||||
|
||||
>>> AccountRule = Model.get('account.account.rule')
|
||||
>>> Party = Model.get('party.party')
|
||||
@@ -24,15 +26,9 @@ Activate modules::
|
||||
>>> Sale = Model.get('sale.sale')
|
||||
>>> Tax = Model.get('account.tax')
|
||||
|
||||
Create company::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
|
||||
Create chart of accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> account_revenue1 = accounts['revenue']
|
||||
>>> account_revenue2, = account_revenue1.duplicate()
|
||||
>>> account_revenue3, = account_revenue1.duplicate()
|
||||
|
||||
@@ -12,30 +12,26 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... create_payment_term, set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_statement', 'account_invoice'])
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules(
|
||||
... ['account_statement', 'account_invoice'],
|
||||
... create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> payable = accounts['payable']
|
||||
>>> revenue = accounts['revenue']
|
||||
|
||||
@@ -12,7 +12,7 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_statement'])
|
||||
>>> config = activate_modules('account_statement', create_company, create_chart)
|
||||
|
||||
>>> AccountJournal = Model.get('account.journal')
|
||||
>>> Bank = Model.get('bank')
|
||||
@@ -20,17 +20,15 @@ Activate modules::
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> StatementJournal = Model.get('account.statement.journal')
|
||||
|
||||
Create company::
|
||||
Get currencies and company::
|
||||
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> usd = get_currency('USD')
|
||||
|
||||
>>> _ = create_company(currency=usd)
|
||||
>>> company = get_company()
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create bank account::
|
||||
|
||||
+5
-5
@@ -20,7 +20,9 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(['account_statement', 'account_invoice'])
|
||||
>>> config = activate_modules(
|
||||
... ['account_statement', 'account_invoice'],
|
||||
... create_company, create_chart)
|
||||
|
||||
>>> AccountConfiguration = Model.get('account.configuration')
|
||||
>>> AccountJournal = Model.get('account.journal')
|
||||
@@ -29,20 +31,18 @@ Activate modules::
|
||||
>>> Statement = Model.get('account.statement')
|
||||
>>> StatementJournal = Model.get('account.statement.journal')
|
||||
|
||||
Create company::
|
||||
Get currencies::
|
||||
|
||||
>>> usd = get_currency('USD')
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> _ = create_company(currency=usd)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart()
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Configure currency exchange::
|
||||
|
||||
@@ -12,30 +12,24 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_statement')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_statement', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> expense = accounts['expense']
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
@@ -12,30 +12,24 @@ Imports::
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_statement')
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
>>> company = get_company()
|
||||
>>> config = activate_modules('account_statement', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(company, today))
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> receivable = accounts['receivable']
|
||||
>>> revenue = accounts['revenue']
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
@@ -4,6 +4,8 @@ Account Statement AEB43 Scenario
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import create_chart, get_accounts
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
@@ -13,20 +15,23 @@ Imports::
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_statement_aeb43')
|
||||
>>> config = activate_modules(
|
||||
... 'account_statement_aeb43',
|
||||
... partial(create_company, currency='EUR'), create_chart)
|
||||
|
||||
Create company::
|
||||
Get company::
|
||||
|
||||
>>> company = get_company()
|
||||
|
||||
Setup currency::
|
||||
|
||||
>>> eur = get_currency('EUR')
|
||||
>>> eur.numeric_code = '978'
|
||||
>>> eur.save()
|
||||
>>> _ = create_company(currency=eur)
|
||||
>>> company = get_company()
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
Create parties::
|
||||
|
||||
@@ -4,26 +4,27 @@ Account Statement Coda Scenario
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import create_chart, get_accounts
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.tools import file_open
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_statement_coda')
|
||||
>>> config = activate_modules(
|
||||
... 'account_statement_coda',
|
||||
... partial(create_company, currency='EUR'), create_chart)
|
||||
|
||||
Create company::
|
||||
Get company::
|
||||
|
||||
>>> _ = create_company(currency=get_currency('EUR'))
|
||||
>>> company = get_company()
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
Create parties::
|
||||
|
||||
@@ -4,16 +4,19 @@ Account Statement MT940 Scenario
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import create_chart, get_accounts
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
>>> from trytond.tools import file_open
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_statement_mt940')
|
||||
>>> config = activate_modules(
|
||||
... 'account_statement_mt940',
|
||||
... partial(create_company, currency='EUR'), create_chart)
|
||||
|
||||
>>> AccountJournal = Model.get('account.journal')
|
||||
>>> Bank = Model.get('bank')
|
||||
@@ -22,14 +25,12 @@ Activate modules::
|
||||
>>> Statement = Model.get('account.statement')
|
||||
>>> StatementJournal = Model.get('account.statement.journal')
|
||||
|
||||
Create company::
|
||||
Get company::
|
||||
|
||||
>>> _ = create_company(currency=get_currency('EUR'))
|
||||
>>> company = get_company()
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
|
||||
Create parties::
|
||||
|
||||
@@ -4,26 +4,27 @@ Account Statement OFX Scenario
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from functools import partial
|
||||
|
||||
>>> from proteus import Model, Wizard
|
||||
>>> from trytond.modules.account.tests.tools import create_chart, get_accounts
|
||||
>>> from trytond.modules.company.tests.tools import create_company, get_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules, assertEqual
|
||||
>>> from trytond.tools import file_open
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules('account_statement_ofx')
|
||||
>>> config = activate_modules(
|
||||
... 'account_statement_ofx',
|
||||
... partial(create_company, currency='EUR'), create_chart)
|
||||
|
||||
Create company::
|
||||
Get company::
|
||||
|
||||
>>> _ = create_company(currency=get_currency('EUR'))
|
||||
>>> company = get_company()
|
||||
|
||||
Create chart of accounts::
|
||||
Get accounts::
|
||||
|
||||
>>> _ = create_chart(company)
|
||||
>>> accounts = get_accounts(company)
|
||||
>>> accounts = get_accounts()
|
||||
>>> cash = accounts['cash']
|
||||
|
||||
Create parties::
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user