From bf0d3c6680671c4e35f59f5374cd80a0983874d2 Mon Sep 17 00:00:00 2001 From: Nicolas Bessi Date: Tue, 18 Mar 2014 16:55:12 +0100 Subject: [PATCH] [FIX] add YML test on aged partner balance --- .../__openerp__.py | 3 +- .../tests/aged_trial_balance.yml | 60 +++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 account_financial_report_webkit/tests/aged_trial_balance.yml diff --git a/account_financial_report_webkit/__openerp__.py b/account_financial_report_webkit/__openerp__.py index 49946609..40bfc53b 100644 --- a/account_financial_report_webkit/__openerp__.py +++ b/account_financial_report_webkit/__openerp__.py @@ -197,7 +197,8 @@ wkhtmltopdf. The texts are defined inside the report classes. 'tests/partner_ledger.yml', 'tests/trial_balance.yml', 'tests/partner_balance.yml', - 'tests/open_invoices.yml',], + 'tests/open_invoices.yml', + 'tests/aged_trial_balance.yml'], #'tests/account_move_line.yml' 'active': False, 'installable': True, diff --git a/account_financial_report_webkit/tests/aged_trial_balance.yml b/account_financial_report_webkit/tests/aged_trial_balance.yml new file mode 100644 index 00000000..fa311429 --- /dev/null +++ b/account_financial_report_webkit/tests/aged_trial_balance.yml @@ -0,0 +1,60 @@ +- + In order to test the PDF Aged Partner Balance Report webkit wizard I will print report with default setting +- + !python {model: account.account}: | + from datetime import datetime + ctx={} + data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)} + from tools import test_reports + test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') + +- + In order to test the PDF Aged Partner Balance Report webkit wizard I will print report with filters and currency +- + !python {model: account.account}: | + from datetime import datetime + ctx={} + data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), + 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', + 'amount_currency': True, 'result_selection': 'customer_supplier'} + from tools import test_reports + test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') + +- + In order to test the PDF Aged Partner Balance Report webkit wizard I will print report with filters on partners +- + !python {model: account.account}: | + from datetime import datetime + ctx={} + data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), + 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', + 'amount_currency': True, 'result_selection': 'customer_supplier', + 'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]} + from tools import test_reports + test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') + +- + In order to test the PDF Aged Partner Balance Report webkit wizard I will print report with filters on periods +- + !python {model: account.account}: | + from datetime import datetime + ctx={} + data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), + 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', + 'amount_currency': True, 'result_selection': 'customer_supplier', + 'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')} + from tools import test_reports + test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') + +- + In order to test the PDF Aged Partner Balance Report webkit wizard I will print report with filters on dates +- + !python {model: account.account}: | + from datetime import datetime + ctx={} + data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), + 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', + 'amount_currency': True, 'result_selection': 'customer_supplier', + 'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)} + from tools import test_reports + test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')