diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index ec61248e147..c8d17c2cf9e 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -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, diff --git a/addons/account/test/account_fiscalyear_close_state.yml b/addons/account/test/account_fiscalyear_close_state.yml index af4d05eba76..18c7dd570ed 100644 --- a/addons/account/test/account_fiscalyear_close_state.yml +++ b/addons/account/test/account_fiscalyear_close_state.yml @@ -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' - - -