diff --git a/account_financial_report_date_range/README.rst b/account_financial_report_date_range/README.rst new file mode 100644 index 00000000..ecca3b41 --- /dev/null +++ b/account_financial_report_date_range/README.rst @@ -0,0 +1,79 @@ +=================================== +Account Financial Report Date Range +=================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github + :target: https://github.com/OCA/account-financial-reporting/tree/11.0/account_financial_report_date_range + :alt: OCA/account-financial-reporting +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-financial-reporting-11-0/account-financial-reporting-11-0-account_financial_report_date_range + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/91/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the 'Date Range' field to the Odoo CE standard addons +financial reports wizard. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +There is no specific installation procedure for this module. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Noviat + +Contributors +~~~~~~~~~~~~ + +* Luc De Meyer + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/account-financial-reporting `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_financial_report_date_range/__init__.py b/account_financial_report_date_range/__init__.py new file mode 100644 index 00000000..5cb1c491 --- /dev/null +++ b/account_financial_report_date_range/__init__.py @@ -0,0 +1 @@ +from . import wizards diff --git a/account_financial_report_date_range/__manifest__.py b/account_financial_report_date_range/__manifest__.py new file mode 100644 index 00000000..6f51633d --- /dev/null +++ b/account_financial_report_date_range/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright 2009-2018 Noviat. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Account Financial Report Date Range', + 'summary': """ + Add Date Range field to the Odoo OE standard addons + financial reports wizard. + """, + 'version': '12.0.1.0.0', + 'category': 'Accounting & Finance', + 'website': 'https://github.com/OCA/account-financial-reporting', + 'author': 'Noviat,' + 'Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': True, + 'depends': [ + 'account', + 'date_range', + ], + 'data': [ + 'wizards/accounting_report.xml', + ], +} diff --git a/account_financial_report_date_range/i18n/account_financial_report_date_range.pot b/account_financial_report_date_range/i18n/account_financial_report_date_range.pot new file mode 100644 index 00000000..f528585c --- /dev/null +++ b/account_financial_report_date_range/i18n/account_financial_report_date_range.pot @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_financial_report_date_range +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_financial_report_date_range +#: model:ir.model,name:account_financial_report_date_range.model_account_common_report +msgid "Account Common Report" +msgstr "" + +#. module: account_financial_report_date_range +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_aged_trial_balance_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_balance_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_account_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_journal_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_partner_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_print_journal_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_report_general_ledger_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_report_partner_ledger_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_tax_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_accounting_report_date_range_id +msgid "Date range" +msgstr "" + diff --git a/account_financial_report_date_range/i18n/de.po b/account_financial_report_date_range/i18n/de.po new file mode 100644 index 00000000..277678d5 --- /dev/null +++ b/account_financial_report_date_range/i18n/de.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_financial_report_date_range +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-02-14 07:15+0000\n" +"Last-Translator: Thorsten Vocks \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" + +#. module: account_financial_report_date_range +#: model:ir.model,name:account_financial_report_date_range.model_account_common_report +msgid "Account Common Report" +msgstr "Gemeinsamer Finanzbericht" + +#. module: account_financial_report_date_range +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_aged_trial_balance_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_balance_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_account_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_journal_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_partner_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_print_journal_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_report_general_ledger_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_report_partner_ledger_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_tax_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_accounting_report_date_range_id +msgid "Date range" +msgstr "Datumsbereich" diff --git a/account_financial_report_date_range/i18n/it.po b/account_financial_report_date_range/i18n/it.po new file mode 100644 index 00000000..a17d0bda --- /dev/null +++ b/account_financial_report_date_range/i18n/it.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_financial_report_date_range +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: account_financial_report_date_range +#: model:ir.model,name:account_financial_report_date_range.model_account_common_report +msgid "Account Common Report" +msgstr "" + +#. module: account_financial_report_date_range +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_aged_trial_balance_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_balance_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_account_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_journal_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_partner_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_common_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_print_journal_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_report_general_ledger_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_report_partner_ledger_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_account_tax_report_date_range_id +#: model:ir.model.fields,field_description:account_financial_report_date_range.field_accounting_report_date_range_id +msgid "Date range" +msgstr "" diff --git a/account_financial_report_date_range/readme/CONTRIBUTORS.rst b/account_financial_report_date_range/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..b2f88b3c --- /dev/null +++ b/account_financial_report_date_range/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Luc De Meyer +* Nikos Tsirintanis diff --git a/account_financial_report_date_range/readme/DESCRIPTION.rst b/account_financial_report_date_range/readme/DESCRIPTION.rst new file mode 100644 index 00000000..6fa62fe1 --- /dev/null +++ b/account_financial_report_date_range/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module adds the 'Date Range' field to the Odoo CE standard addons +financial reports wizard. diff --git a/account_financial_report_date_range/readme/INSTALL.rst b/account_financial_report_date_range/readme/INSTALL.rst new file mode 100644 index 00000000..9d94322d --- /dev/null +++ b/account_financial_report_date_range/readme/INSTALL.rst @@ -0,0 +1 @@ +There is no specific installation procedure for this module. diff --git a/account_financial_report_date_range/static/description/icon.png b/account_financial_report_date_range/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/account_financial_report_date_range/static/description/icon.png differ diff --git a/account_financial_report_date_range/static/description/index.html b/account_financial_report_date_range/static/description/index.html new file mode 100644 index 00000000..fae689aa --- /dev/null +++ b/account_financial_report_date_range/static/description/index.html @@ -0,0 +1,425 @@ + + + + + + +Account Financial Report Date Range + + + +
+

Account Financial Report Date Range

+ + +

Beta License: AGPL-3 OCA/account-financial-reporting Translate me on Weblate Try me on Runbot

+

This module adds the ‘Date Range’ field to the Odoo CE standard addons +financial reports wizard.

+

Table of contents

+ +
+

Installation

+

There is no specific installation procedure for this module.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Noviat
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/account-financial-reporting project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/account_financial_report_date_range/tests/__init__.py b/account_financial_report_date_range/tests/__init__.py new file mode 100644 index 00000000..622731e7 --- /dev/null +++ b/account_financial_report_date_range/tests/__init__.py @@ -0,0 +1 @@ +from . import test_accounting_report diff --git a/account_financial_report_date_range/tests/test_accounting_report.py b/account_financial_report_date_range/tests/test_accounting_report.py new file mode 100644 index 00000000..5459f605 --- /dev/null +++ b/account_financial_report_date_range/tests/test_accounting_report.py @@ -0,0 +1,30 @@ +# Copyright 2009-2017 Noviat. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import time +from odoo.tests.common import TransactionCase + + +class TestAccountingReport(TransactionCase): + + def setUp(self): + super(TestAccountingReport, self).setUp() + p_type = self.env['date.range.type'].create({ + 'name': 'Fiscal Period', + 'allow_overlap': False}) + self.p1 = self.env['date.range'].create({ + 'name': 'P01', + 'type_id': p_type.id, + 'date_start': time.strftime('%Y-01-01'), + 'date_end': time.strftime('%Y-01-31')}) + + def test_accounting_report(self): + bs = self.env.ref( + 'account.account_financial_report_balancesheet0') + wiz = self.env['accounting.report'].create({ + 'account_report_id': bs.id}) + + # Check date_range onchange + wiz.date_range_id = self.p1 + wiz._onchange_date_range_id() + self.assertEquals(wiz.date_from, time.strftime('%Y-01-01')) diff --git a/account_financial_report_date_range/wizards/__init__.py b/account_financial_report_date_range/wizards/__init__.py new file mode 100644 index 00000000..e8a358ef --- /dev/null +++ b/account_financial_report_date_range/wizards/__init__.py @@ -0,0 +1 @@ +from . import account_common_report diff --git a/account_financial_report_date_range/wizards/account_common_report.py b/account_financial_report_date_range/wizards/account_common_report.py new file mode 100644 index 00000000..e222f681 --- /dev/null +++ b/account_financial_report_date_range/wizards/account_common_report.py @@ -0,0 +1,18 @@ +# Copyright 2009-2017 Noviat. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class AccountCommonReport(models.TransientModel): + _inherit = 'account.common.report' + + date_range_id = fields.Many2one( + comodel_name='date.range', + string='Date range', + ) + + @api.onchange('date_range_id') + def _onchange_date_range_id(self): + self.date_from = self.date_range_id.date_start + self.date_to = self.date_range_id.date_end diff --git a/account_financial_report_date_range/wizards/accounting_report.xml b/account_financial_report_date_range/wizards/accounting_report.xml new file mode 100644 index 00000000..00455c50 --- /dev/null +++ b/account_financial_report_date_range/wizards/accounting_report.xml @@ -0,0 +1,16 @@ + + + + + account.common.report.form.date_range + account.common.report + + + + + + + + + +