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.

60 lines
3.4 KiB

  1. -
  2. In order to test the PDF Partner Ledger 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 openerp.tools import test_reports
  9. test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
  10. -
  11. In order to test the PDF Partner Ledger webkit wizard I will print report with filters and currency
  12. -
  13. !python {model: account.account}: |
  14. from datetime import datetime
  15. ctx={}
  16. data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
  17. 'target_move': 'posted',
  18. 'amount_currency': True, 'result_selection': 'customer_supplier'}
  19. from openerp.tools import test_reports
  20. test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
  21. -
  22. In order to test the PDF Partner Ledger webkit wizard I will print report with filters on partners
  23. -
  24. !python {model: account.account}: |
  25. from datetime import datetime
  26. ctx={}
  27. data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
  28. 'target_move': 'posted',
  29. 'amount_currency': True, 'result_selection': 'customer_supplier',
  30. 'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]}
  31. from openerp.tools import test_reports
  32. test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
  33. -
  34. In order to test the PDF Partner Ledger webkit wizard I will print report with filters on periods
  35. -
  36. !python {model: account.account}: |
  37. from datetime import datetime
  38. ctx={}
  39. data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
  40. 'target_move': 'posted',
  41. 'amount_currency': True, 'result_selection': 'customer_supplier',
  42. 'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
  43. from openerp.tools import test_reports
  44. test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
  45. -
  46. In order to test the PDF Partner Ledger webkit wizard I will print report with filters on dates
  47. -
  48. !python {model: account.account}: |
  49. from datetime import datetime
  50. ctx={}
  51. data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
  52. 'target_move': 'posted',
  53. 'amount_currency': True, 'result_selection': 'customer_supplier',
  54. 'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
  55. from openerp.tools import test_reports
  56. test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')