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') + +