From 5c11adfe86f924ca9b5e6476ed963aea8fdad57a Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 11 May 2017 18:17:50 +0200 Subject: [PATCH] [FIX] use account's fiscal year for tests --- .../tests/export_csv_journal_by_period.yml | 8 ++++---- .../tests/print_journal_by_period.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/account_journal_report_xls/tests/export_csv_journal_by_period.yml b/account_journal_report_xls/tests/export_csv_journal_by_period.yml index bc2e0f07..dfcc0da9 100644 --- a/account_journal_report_xls/tests/export_csv_journal_by_period.yml +++ b/account_journal_report_xls/tests/export_csv_journal_by_period.yml @@ -3,7 +3,7 @@ - !python {model: account.account}: | ctx = {} - fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + fiscalyear_id = ref('account.data_fiscalyear') wizard = self.pool['account.print.journal.xls'] period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) data_dict = {'chart_account_id': ref('account.chart0'), @@ -29,7 +29,7 @@ - !python {model: account.account}: | ctx = {} - fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + fiscalyear_id = ref('account.data_fiscalyear') wizard = self.pool['account.print.journal.xls'] period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) data_dict = {'chart_account_id': ref('account.chart0'), @@ -56,7 +56,7 @@ - !python {model: account.account}: | ctx = {} - fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + fiscalyear_id = ref('account.data_fiscalyear') wizard = self.pool['account.print.journal.xls'] period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) data_dict = {'chart_account_id': ref('account.chart0'), @@ -83,7 +83,7 @@ - !python {model: account.account}: | ctx = {} - fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + fiscalyear_id = ref('account.data_fiscalyear') wizard = self.pool['account.print.journal.xls'] period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) data_dict = {'chart_account_id': ref('account.chart0'), diff --git a/account_journal_report_xls/tests/print_journal_by_period.yml b/account_journal_report_xls/tests/print_journal_by_period.yml index eb36060c..2bf5e791 100644 --- a/account_journal_report_xls/tests/print_journal_by_period.yml +++ b/account_journal_report_xls/tests/print_journal_by_period.yml @@ -3,7 +3,7 @@ - !python {model: account.account}: | ctx = {} - fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + fiscalyear_id = ref('account.data_fiscalyear') wizard = self.pool['account.print.journal.xls'] period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) data_dict = {'chart_account_id': ref('account.chart0'), @@ -29,7 +29,7 @@ - !python {model: account.account}: | ctx = {} - fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + fiscalyear_id = ref('account.data_fiscalyear') wizard = self.pool['account.print.journal.xls'] period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) data_dict = {'chart_account_id': ref('account.chart0'), @@ -56,7 +56,7 @@ - !python {model: account.account}: | ctx = {} - fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + fiscalyear_id = ref('account.data_fiscalyear') wizard = self.pool['account.print.journal.xls'] period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) data_dict = {'chart_account_id': ref('account.chart0'), @@ -83,7 +83,7 @@ - !python {model: account.account}: | ctx = {} - fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + fiscalyear_id = ref('account.data_fiscalyear') wizard = self.pool['account.print.journal.xls'] period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) data_dict = {'chart_account_id': ref('account.chart0'),