You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
3.9 KiB

  1. -
  2. In order to test the PDF Trial Balance webkit wizard I will print report with default setting
  3. -
  4. !python {model: account.account}: |
  5. from datetime import datetime
  6. ctx={}
  7. data_dict = {'chart_account_id':ref('account.chart0')}
  8. from tools import test_reports
  9. 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')
  10. -
  11. In order to test the PDF Trial Balance webkit wizard I will print report as if we print it from an account
  12. -
  13. !python {model: account.account}: |
  14. from datetime import datetime
  15. ctx={}
  16. data_dict = {'chart_account_id':ref('account.chart0')}
  17. ctx.update({'model': 'account.account','active_ids':[ref('account.assets_view'), ref('account.liabilities_view')],'active_id': ref('account.assets_view')})
  18. from tools import test_reports
  19. 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')
  20. -
  21. In order to test the PDF Trial Balance webkit wizard I will print report with filters on period
  22. -
  23. !python {model: account.account}: |
  24. from datetime import datetime
  25. ctx={}
  26. data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
  27. 'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
  28. from tools import test_reports
  29. 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')
  30. -
  31. In order to test the PDF Trial Balance webkit wizard I will print report with filters on dates
  32. -
  33. !python {model: account.account}: |
  34. from datetime import datetime
  35. ctx={}
  36. data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
  37. 'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
  38. from tools import test_reports
  39. 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')
  40. -
  41. In order to test the PDF Trial Balance webkit wizard I will print report with one comparison filtered by year
  42. -
  43. !python {model: account.account}: |
  44. from datetime import datetime
  45. ctx={}
  46. data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
  47. 'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear')}
  48. from tools import test_reports
  49. 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')
  50. -
  51. In order to test the PDF Trial Balance webkit wizard I will print report with all comparisons filtered by year, period and date
  52. -
  53. !python {model: account.account}: |
  54. from datetime import datetime
  55. ctx={}
  56. data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
  57. 'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear'),
  58. 'comp1_filter': 'filter_period', 'comp1_period_from': ref('account.period_1'), 'comp1_period_to': ref('account.period_12'),
  59. 'comp2_filter': 'filter_date', 'comp2_date_from': '%s-01-01' %(datetime.now().year), 'comp2_date_to': '%s-12-31' %(datetime.now().year)
  60. }
  61. from tools import test_reports
  62. 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')