From a7ce37d8bcbba5ed648991b13a6f4ebf3b7f46a1 Mon Sep 17 00:00:00 2001 From: Damien Crier Date: Tue, 26 Apr 2016 17:32:02 +0200 Subject: [PATCH 001/143] [ADD] new module to manage financial reports in OCA --- account_financial_report_qweb/__init__.py | 8 +++++ account_financial_report_qweb/__openerp__.py | 30 +++++++++++++++++++ .../models/__init__.py | 4 +++ .../report/__init__.py | 4 +++ .../wizard/__init__.py | 4 +++ 5 files changed, 50 insertions(+) create mode 100644 account_financial_report_qweb/__init__.py create mode 100644 account_financial_report_qweb/__openerp__.py create mode 100644 account_financial_report_qweb/models/__init__.py create mode 100644 account_financial_report_qweb/report/__init__.py create mode 100644 account_financial_report_qweb/wizard/__init__.py diff --git a/account_financial_report_qweb/__init__.py b/account_financial_report_qweb/__init__.py new file mode 100644 index 00000000..11426ddb --- /dev/null +++ b/account_financial_report_qweb/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# Author: Damien Crier +# Copyright 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models +from . import wizard +from . import report diff --git a/account_financial_report_qweb/__openerp__.py b/account_financial_report_qweb/__openerp__.py new file mode 100644 index 00000000..99f4e795 --- /dev/null +++ b/account_financial_report_qweb/__openerp__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Author: Damien Crier +# Copyright 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + 'name': 'QWeb Financial Reports', + 'version': '9.0.0.1.0', + 'category': 'Reporting', + 'summary': """ + OCA Financial Reports + """, + 'author': 'Camptocamp SA,' + 'Odoo Community Association (OCA)', + 'website': 'http://www.camptocamp.com', + 'depends': [ + 'account', + ], + 'data': [ + ], + 'test': [ + ], + 'demo': [ + ], + 'qweb': [ + ], + 'installable': True, + 'application': True, + 'auto_install': False, + 'license': 'AGPL-3', +} diff --git a/account_financial_report_qweb/models/__init__.py b/account_financial_report_qweb/models/__init__.py new file mode 100644 index 00000000..28867113 --- /dev/null +++ b/account_financial_report_qweb/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Author: Damien Crier +# Copyright 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/account_financial_report_qweb/report/__init__.py b/account_financial_report_qweb/report/__init__.py new file mode 100644 index 00000000..28867113 --- /dev/null +++ b/account_financial_report_qweb/report/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Author: Damien Crier +# Copyright 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/account_financial_report_qweb/wizard/__init__.py b/account_financial_report_qweb/wizard/__init__.py new file mode 100644 index 00000000..28867113 --- /dev/null +++ b/account_financial_report_qweb/wizard/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Author: Damien Crier +# Copyright 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). From 18232a7261d2475c8e39e8f63c5513bc0b6202d0 Mon Sep 17 00:00:00 2001 From: Damien Crier Date: Tue, 26 Apr 2016 18:36:02 +0200 Subject: [PATCH 002/143] [ADD] add base wizard for ledger --- account_financial_report_qweb/__openerp__.py | 1 + .../wizard/__init__.py | 1 + .../wizard/ledger_report_wizard.py | 15 ++++++++ .../wizard/ledger_report_wizard_view.xml | 37 +++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 account_financial_report_qweb/wizard/ledger_report_wizard.py create mode 100644 account_financial_report_qweb/wizard/ledger_report_wizard_view.xml diff --git a/account_financial_report_qweb/__openerp__.py b/account_financial_report_qweb/__openerp__.py index 99f4e795..74186bfa 100644 --- a/account_financial_report_qweb/__openerp__.py +++ b/account_financial_report_qweb/__openerp__.py @@ -16,6 +16,7 @@ 'account', ], 'data': [ + 'wizard/ledger_report_wizard_view.xml', ], 'test': [ ], diff --git a/account_financial_report_qweb/wizard/__init__.py b/account_financial_report_qweb/wizard/__init__.py index 28867113..87b64336 100644 --- a/account_financial_report_qweb/wizard/__init__.py +++ b/account_financial_report_qweb/wizard/__init__.py @@ -2,3 +2,4 @@ # Author: Damien Crier # Copyright 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from . import ledger_report_wizard diff --git a/account_financial_report_qweb/wizard/ledger_report_wizard.py b/account_financial_report_qweb/wizard/ledger_report_wizard.py new file mode 100644 index 00000000..706086af --- /dev/null +++ b/account_financial_report_qweb/wizard/ledger_report_wizard.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Author: Damien Crier +# Copyright 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +import time + +from openerp import models, fields, api + + +class LedgerReportWizard(models.TransientModel): + + _name = "ledger.report.wizard" + _description = "Ledger Report" + + company_id = fields.Many2one(comodel_name='res.company') diff --git a/account_financial_report_qweb/wizard/ledger_report_wizard_view.xml b/account_financial_report_qweb/wizard/ledger_report_wizard_view.xml new file mode 100644 index 00000000..c073e29d --- /dev/null +++ b/account_financial_report_qweb/wizard/ledger_report_wizard_view.xml @@ -0,0 +1,37 @@ + + + + + + Ledger + ledger.report.wizard + +
+ + + +
+
+
+ + + Ledger + ir.actions.act_window + ledger.report.wizard + form + form + + new + + + + + + +
+
From 7b224ee66d649d5f46024772ab6ef0ec13af37b6 Mon Sep 17 00:00:00 2001 From: Leonardo Pistone Date: Tue, 26 Apr 2016 18:51:56 +0200 Subject: [PATCH 003/143] remove unused imports --- account_financial_report_qweb/wizard/ledger_report_wizard.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/account_financial_report_qweb/wizard/ledger_report_wizard.py b/account_financial_report_qweb/wizard/ledger_report_wizard.py index 706086af..0550c1b4 100644 --- a/account_financial_report_qweb/wizard/ledger_report_wizard.py +++ b/account_financial_report_qweb/wizard/ledger_report_wizard.py @@ -2,9 +2,7 @@ # Author: Damien Crier # Copyright 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -import time - -from openerp import models, fields, api +from openerp import models, fields class LedgerReportWizard(models.TransientModel): From 11ef6544e54c3935aa369cecb6fe4a0527fd82f2 Mon Sep 17 00:00:00 2001 From: Damien Crier Date: Tue, 26 Apr 2016 19:24:02 +0200 Subject: [PATCH 004/143] [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 @@ + + + + + + + + + + + +