[MODULE] +v1.1.0 from https://www.odoo.com/apps/7.0/account_financial_report_webkit/
[burette/account_financial_report_webkit.git] / tests / trial_balance.yml
diff --git a/tests/trial_balance.yml b/tests/trial_balance.yml
new file mode 100644 (file)
index 0000000..f5d276c
--- /dev/null
@@ -0,0 +1,67 @@
+-
+  In order to test the PDF Trial Balance 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')}
+        from tools import test_reports
+        test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
+
+-
+  In order to test the PDF Trial Balance webkit wizard I will print report as if we print it from an account
+-
+    !python {model: account.account}: |
+        from datetime import datetime
+        ctx={}
+        data_dict = {'chart_account_id':ref('account.chart0')}
+        ctx.update({'model': 'account.account','active_ids':[ref('account.assets_view'), ref('account.liabilities_view')],'active_id': ref('account.assets_view')})
+        from tools import test_reports
+        test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
+
+-
+  In order to test the PDF Trial Balance webkit wizard I will print report with filters on period
+-
+    !python {model: account.account}: |
+        from datetime import datetime
+        ctx={}
+        data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
+                     '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_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
+
+-
+  In order to test the PDF Trial Balance 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'),
+                     '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_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
+
+-
+  In order to test the PDF Trial Balance webkit wizard I will print report with one comparison filtered by year
+-
+    !python {model: account.account}: |
+        from datetime import datetime
+        ctx={}
+        data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
+                     'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear')}
+        from tools import test_reports
+        test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
+
+-
+  In order to test the PDF Trial Balance webkit wizard I will print report with all comparisons filtered by year, period and date
+-
+    !python {model: account.account}: |
+        from datetime import datetime
+        ctx={}
+        data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
+                     'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear'),
+                     'comp1_filter': 'filter_period', 'comp1_period_from': ref('account.period_1'), 'comp1_period_to': ref('account.period_12'),
+                     'comp2_filter': 'filter_date', 'comp2_date_from': '%s-01-01' %(datetime.now().year), 'comp2_date_to': '%s-12-31' %(datetime.now().year)
+                     }
+        from tools import test_reports
+        test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')