From b7d9759a138213a3a39e63cd1d5ddc4d22c7af6b Mon Sep 17 00:00:00 2001 From: rde <> Date: Tue, 9 Jan 2007 09:21:20 +0000 Subject: [PATCH] Report for analytic account budget bzr revid: rde-64e5549e94f3e99df438c01080569b50dc67cef2 --- addons/account/project/project_report.xml | 11 +++- addons/account/project/wizard/__init__.py | 2 +- .../wizard_account_analytic_budget_report.py | 55 +++++++++++++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 addons/account/project/wizard/wizard_account_analytic_budget_report.py diff --git a/addons/account/project/project_report.xml b/addons/account/project/project_report.xml index c8438feba15..8ba1ca243d3 100644 --- a/addons/account/project/project_report.xml +++ b/addons/account/project/project_report.xml @@ -103,7 +103,16 @@ keyword="client_print_multi"/> - + + + +
+ + +''' + +dates_fields = { + 'date1': {'string':'Start of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-01-01')}, + 'date2': {'string':'End of period', 'type':'date', 'required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')}, +} + +class wizard_report(wizard.interface): + states = { + 'init': { + 'actions': [], + 'result': {'type':'form', 'arch':dates_form, 'fields':dates_fields, 'state':[('end','Cancel'),('report','Print')]} + }, + 'report': { + 'actions': [], + 'result': {'type':'print', 'report':'account.analytic.budget.print', 'state':'end'} + } + } +wizard_report('account.analytic.budget.report') + +