From 392559d25f15ea568d8716f4e42618cb814fbfca Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 7 Jun 2007 12:00:30 +0000 Subject: [PATCH] KERNEL: add test for duplicate report and wizard Remove/Fix all the duplicate report and wizard Don't instanciate auto report when update as there are already Instanciate auto report only if it don't exist in netsvc bzr revid: ced-56a64c2e91044d9c71d325adc716d53a6d477d33 --- .../account_simulation_view.xml | 1 + .../wizard/wizard_account_chart.py | 2 +- .../hr_timesheet_invoice_report.xml | 4 +- .../report/cost_ledger.py | 2 +- .../hr_timesheet_invoice/wizard/__init__.py | 1 + ...ard_account_analytic_cost_ledger_report.py | 55 +++++++++ .../purchase_discount_report.xml | 2 +- addons/purchase_discount/report/order.py | 2 +- addons/sale/sale_wizard.xml | 1 - addons/sale/wizard/__init__.py | 1 - addons/sale/wizard/makesale.py | 104 ------------------ 11 files changed, 63 insertions(+), 112 deletions(-) create mode 100644 addons/hr_timesheet_invoice/wizard/wizard_account_analytic_cost_ledger_report.py delete mode 100644 addons/sale/wizard/makesale.py diff --git a/addons/account_simulation/account_simulation_view.xml b/addons/account_simulation/account_simulation_view.xml index 8530bdcb30e..c112f89d831 100644 --- a/addons/account_simulation/account_simulation_view.xml +++ b/addons/account_simulation/account_simulation_view.xml @@ -71,6 +71,7 @@ id="menu_action_account_journal_tree" action="action_account_journal_tree"/> + diff --git a/addons/account_simulation/wizard/wizard_account_chart.py b/addons/account_simulation/wizard/wizard_account_chart.py index 36885f12231..dc0c50fce8f 100644 --- a/addons/account_simulation/wizard/wizard_account_chart.py +++ b/addons/account_simulation/wizard/wizard_account_chart.py @@ -78,4 +78,4 @@ class wizard_account_chart(wizard.interface): 'result': {'type': 'action', 'action':_account_chart_open_window, 'state':'end'} } } -wizard_account_chart('account.chart') +wizard_account_chart('account.simulation.chart') diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml index 65b8ef9b969..c86f38c04f2 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_report.xml @@ -6,7 +6,7 @@ id="account_analytic_account_cost_ledger" string="Cost Ledger" model="account.analytic.account" - name="account.analytic.account.cost_ledger" + name="hr.timesheet.invoice.account.analytic.account.cost_ledger" rml="account/project/report/cost_ledger.rml" auto="False" menu="False"/> @@ -15,7 +15,7 @@ id="account_analytic_account_cost_ledger_report" string="Cost Ledger" model="account.analytic.account" - name="account.analytic.account.cost_ledger.report" + name="hr.timesheet.invoice.account.analytic.account.cost_ledger.report" 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':'hr.timesheet.invoice.account.analytic.account.cost_ledger', 'state':'end'} + } + } +wizard_report('hr.timesheet.invoice.account.analytic.account.cost_ledger.report') + + diff --git a/addons/purchase_discount/purchase_discount_report.xml b/addons/purchase_discount/purchase_discount_report.xml index 91bccdd6177..16d44d03e03 100644 --- a/addons/purchase_discount/purchase_discount_report.xml +++ b/addons/purchase_discount/purchase_discount_report.xml @@ -2,7 +2,7 @@ - -
- - -