[FIX] account: fixed yaml test in order to use demo data (creating a new fiscalyear...
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Mon, 28 Nov 2011 16:28:17 +0000 (17:28 +0100)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Mon, 28 Nov 2011 16:28:17 +0000 (17:28 +0100)
bzr revid: qdp-launchpad@openerp.com-20111128162817-9ldo7aq8ju9drugb

addons/account/__openerp__.py
addons/account/test/account_fiscalyear_close_state.yml

index ec61248..c8d17c2 100644 (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,
index af4d05e..18c7dd5 100644 (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'
 
-
-
-