From 1f36c4b2dd1acd2d763e2cc12903057dfbc67697 Mon Sep 17 00:00:00 2001 From: "pap (openerp)" Date: Thu, 23 Sep 2010 12:49:26 +0530 Subject: [PATCH] [IMP] Account: evaluated dates rather then using static dates in yml test files for fiscal year testing bzr revid: pap@tinyerp.co.in-20100923071926-uuqu681w78pf7ka2 --- .../account/test/account_fiscalyear_close.yml | 23 ++++++++----------- .../test/account_fiscalyear_close_state.yml | 8 +++---- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/addons/account/test/account_fiscalyear_close.yml b/addons/account/test/account_fiscalyear_close.yml index 59cbfdafc0b..b3a4eccf816 100644 --- a/addons/account/test/account_fiscalyear_close.yml +++ b/addons/account/test/account_fiscalyear_close.yml @@ -1,21 +1,21 @@ - - In order to test Generate Fiscalyear Opening Entries wizard of OpenERP I first create a fiscalyear "Fiscal Year 2011" to which the entries will move + In order to test Generate Fiscalyear Opening Entries wizard of OpenERP I first create a fiscalyear to which the entries will move - !record {model: account.fiscalyear, id: account_fiscalyear_fiscalyear0}: - code: FY2011 + code: !eval "'FY%s'% (datetime.now().year+1)" company_id: base.main_company - date_start: '2011-01-01' - date_stop: '2011-12-31' - name: Fiscal Year 2011 + 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 a period "Jan2011" for the new fiscalyear + I create a period for the month of january for the new fiscalyear - !record {model: account.period, id: account_period_jan11}: company_id: base.main_company - date_start: '2011-01-01' - date_stop: '2011-12-31' + date_start: !eval "'%s-01-01'% (datetime.now().year+1)" + date_stop: !eval "'%s-12-31'% (datetime.now().year+1)" fiscalyear_id: account_fiscalyear_fiscalyear0 - name: Jan2011 + name: !eval "'Jan%s' %(datetime.now().year+1)" special: 1 - @@ -90,7 +90,4 @@ # self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US', # "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")], # "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"), -# }) - - - +# }) \ No newline at end of file diff --git a/addons/account/test/account_fiscalyear_close_state.yml b/addons/account/test/account_fiscalyear_close_state.yml index 6d4d5353a19..af4d05eba76 100644 --- a/addons/account/test/account_fiscalyear_close_state.yml +++ b/addons/account/test/account_fiscalyear_close_state.yml @@ -3,11 +3,11 @@ 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: FY2011 + code: !eval "'FY%s'% (datetime.now().year+1)" company_id: base.main_company - date_start: '2011-01-01' - date_stop: '2011-12-31' - name: Fiscal Year 2011 + 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 -