From 11ef6544e54c3935aa369cecb6fe4a0527fd82f2 Mon Sep 17 00:00:00 2001 From: Damien Crier Date: Tue, 26 Apr 2016 19:24:02 +0200 Subject: [PATCH] [ADD] generic wizard for ledger --- .../wizard/ledger_report_wizard.py | 23 ++++++++++++++++++- .../wizard/ledger_report_wizard_view.xml | 18 +++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/account_financial_report_qweb/wizard/ledger_report_wizard.py b/account_financial_report_qweb/wizard/ledger_report_wizard.py index 0550c1b4..0b3cbf9e 100644 --- a/account_financial_report_qweb/wizard/ledger_report_wizard.py +++ b/account_financial_report_qweb/wizard/ledger_report_wizard.py @@ -2,7 +2,7 @@ # Author: Damien Crier # Copyright 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields +from openerp import models, fields, api class LedgerReportWizard(models.TransientModel): @@ -11,3 +11,24 @@ class LedgerReportWizard(models.TransientModel): _description = "Ledger Report" company_id = fields.Many2one(comodel_name='res.company') + # date_range = ?? + date_from = fields.Date() + date_to = fields.Date() + target_move = fields.Selection([('posted', 'All Posted Entries'), + ('all', 'All Entries')], + string='Target Moves', + required=True, + default='posted') + account_ids = fields.Many2many( + comodel_name='account.account', + relation='account_account_ledger_rel', + string='Filter accounts', + ) + amount_currency = fields.Boolean(string='With currency', + default=False) + centralize = fields.Boolean(string='Activate centralization', + default=False) + + @api.multi + def check_report(self): + return True diff --git a/account_financial_report_qweb/wizard/ledger_report_wizard_view.xml b/account_financial_report_qweb/wizard/ledger_report_wizard_view.xml index c073e29d..daa5b193 100644 --- a/account_financial_report_qweb/wizard/ledger_report_wizard_view.xml +++ b/account_financial_report_qweb/wizard/ledger_report_wizard_view.xml @@ -10,6 +10,24 @@ + + + + + + + + + + + +