[FIX] account: fixed yaml test in order to use demo data (creating a new fiscalyear and its periods was crashing buildbot) and moved this test as last one (because there is no way to reopen it for the following tests to create accounting entries in it)

bzr revid: qdp-launchpad@openerp.com-20111128162817-9ldo7aq8ju9drugb
This commit is contained in:
Quentin (OpenERP) 2011-11-28 17:28:17 +01:00
parent 676c1bd337
commit d9d8619bf1
2 changed files with 4 additions and 30 deletions

View File

@ -141,7 +141,6 @@ module named account_voucher.
'test/account_change_currency.yml',
'test/chart_of_account.yml',
'test/account_period_close.yml',
'test/account_fiscalyear_close_state.yml',
'test/account_use_model.yml',
'test/account_validate_account_move.yml',
'test/account_fiscalyear_close.yml',
@ -149,6 +148,7 @@ module named account_voucher.
'test/account_cash_statement.yml',
'test/test_edi_invoice.yml',
'test/account_report.yml',
'test/account_fiscalyear_close_state.yml', #last test, as it will definitively close the demo fiscalyear
],
'installable': True,
'active': False,

View File

@ -1,31 +1,8 @@
-
In order to check the Close a Fiscal Year wizard in OpenERP I first create a Fiscalyear
-
!record {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0}:
code: !eval "'FY%s'% (datetime.now().year+1)"
company_id: base.main_company
date_start: !eval "'%s-01-01' %(datetime.now().year+1)"
date_stop: !eval "'%s-12-31' %(datetime.now().year+1)"
name: !eval "'Fiscal Year %s' %(datetime.now().year+1)"
-
I create monthly Periods for this fiscalyear
-
!python {model: account.fiscalyear}: |
self.create_period(cr, uid, [ref("account_fiscalyear_fiscalyear0")], {"lang":
'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_account_fiscalyear_form")],
"tz": False, "active_id": ref("account.menu_action_account_fiscalyear_form"),
})
-
I check that the fiscalyear state is "Draft"
-
!assert {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0, string: Fiscal Year is in Draft state}:
- state == 'draft'
-
I run the Close a Fiscalyear wizard to close this fiscalyear
I run the Close a Fiscalyear wizard to close the demo fiscalyear
-
!record {model: account.fiscalyear.close.state, id: account_fiscalyear_close_state_0}:
fy_id: account_fiscalyear_fiscalyear0
fy_id: data_fiscalyear
-
I clicked on Close States Button to close fiscalyear
@ -37,9 +14,6 @@
-
I check that the fiscalyear state is now "Done"
-
!assert {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0, string: Fiscal Year is in Done state}:
!assert {model: account.fiscalyear, id: data_fiscalyear, string: Fiscal Year is in Done state}:
- state == 'done'